Hot answers tagged

16 votes

Navigating using SSH

Instead of pointing Vim/Netrw to a file: scp://host/path/file point it to a directory: scp://host/path/ This gives you the same listing and the same shortcuts as if you were browsing your machine.
  • 33.4k
4 votes
Accepted

trailing spaces when copying text from vim session in one server to vim session in another server

This behavior was caused by colorcolumn option. I started to use quoteplus register.
  • 895
3 votes

Vim remotely over SSH channel and see the MATLAB figures

So, 1) editing your file using the SSH protocol and 2) executing your code remotely is possible using vim. vim scp://[user@]machine/path or vim, then :e scp://[user@]machine/path. :!/path/to/matlab ...
3 votes

Why vim scp can't read file on my remote vps?

Okay, I'm blind shooting here, but here are some ideas You have older vim version than 6. The remote file is not readable No space left on the local device. Local firewall blocks the outgoing ...
2 votes
Accepted

how to point xdebug back to vim on local host

I think you're misreading the instructions. You don't need to connections on port 9000 to be re-directed to port 8000. You just need your PHP server to be able to contact your Vim instance. To ...
  • 29.1k
2 votes

Fugitive Gbrowse while being ssh on a server

You can use Gbrowse! to get the url copied into the clipboard and then either paste it in the local browser or fire another :!ssh command from the remote machine to the local machine, like (from vim ...
  • 1,527
2 votes

Vim workflow for projects on remote machines

sshfs is a handy utility that allows one to locally mount a remote project, solving the problem. Granted, it's not as elegant as the plugins actually just working seamlessly on remote files.
2 votes

Can Netrw use [host] type notation to look in .ssh/config and find the host to connect to?

With enough searching and trial and error, this is what ended up working: Host home HostName * User user1 ControlMaster auto ControlPath ~/.ssh/master-socket/%r@%h:%p ControlPersist yes ...
  • 131
2 votes
Accepted

Vim-based alternative for Emacs tramp-mode

I still haven't found the perfect solution, but one that works for me reasonably well: by using vim-slime (which is written in only vimscript). In my config-file (~/.config/nvim/init.vim or ~/.vimrc), ...
  • 151
2 votes
Accepted

copy-paste selection locally when editing files on remote headless server

I cannot use X11Forwarding with SSH (due to policy and due to remote system not having X) That's a very restrictive one... Note that you don't need an X11 server running at your remote machine. All ...
  • 26.5k
1 vote

terminal and ssh-agent/ssh-key

I have a little ssh-reagent function in my zshrc: # Restart ssh-agent after restarting WM or x11 (may be old env var in tmux). ssh-reagent() { export SSH_AUTH_SOCK=$(echo /tmp/ssh-*/agent.*) ...
1 vote

how could I use gvim through ssh two hops

In theory, it's fairly easy. I practice, there are a few gotcha's. Let's walk through this step by step, and I'll tell you what to look for. Once you validate that everything is correct, you ought to ...
  • 111
1 vote

Vim takes a long time to close over SSH?

If $DISPLAY is (incorrectly) set in your SSH environment, then Vim may be timing out trying to connect to an X server that doesn't exist. It does this for functionality like copying to/from the X ...
  • 10.4k
1 vote
Accepted

Navigating using SSH

Oops forgot I had this question opened ! So the problem was that, with the netrw version I had (packaged with vim-gnome on Debian Jessie), modifying a file from the explorer (through ssh) would not ...
  • 251

Only top scored, non community-wiki answers of a minimum length are eligible