Hot answers tagged

16

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.


3

This behavior was caused by colorcolumn option. I started to use quoteplus register.


3

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 some_matlab_file.m However, your request to view your figures through SSH is impossible without using some window/display manager to view your images. So, in ...


3

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 connection Remote firewall blocks the connection Your ssh public key is not in the authorized_keys file on remote Your local ssh keys are not in the default folder ....


2

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 initialize a debugging session, XDebug will attempt to make a connection to the remote host and port that you specified above (localhost:9000), so you need to make ...


2

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 in the ssh session) :Gbrowse! | exe "!ssh $LOCAL 'nohup google-chrome " . @+ . "' &" change google-chrome to other browsers or xdg-open to use the default ...


2

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 you need is the X11 libraries installed. You also would need a build of Vim that has +clipboard feature, which you can typically find in a gvim binary if one is ...


2

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 ProxyCommand nc -v `env | grep 'SSH_CONNECTION' | awk 'match($0,/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/){print substr($0,RSTART,RLENGTH)}' ` "%p" Vim command: $ ...


2

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), I'm using the following line(s): let g:slime_target = "neovim" "let g:slime_target = "vimterminal" "let g:slime_target = "...


1

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 selections. You can verify this in a couple of ways. Check if vim -X removes the delay Use vim --startuptime to see details about what Vim does when starting up. ...


1

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 be able to do this lickity-split. Note: I use Red Hat/CentOS. You may have to make slight variations in commands for your environment. On "local" make sure ...


1

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 use the correct URI (from memory, the '@' in the 'user@host' was missing). It opened an empty file (because it didn't find anything) but it still saved the new ...


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