I am editing a bunch of files on a remote server. I can connect using SSH (public key or password). I use Vim as follows:
vim scp://user@server//path/to/file.cpp
I need to use Vim on my computer because it is customized, thus I don't want to use the Vim installed on the server.
I can't install anything on this remote server. To compile, I run make
.
I'd like to be able to run make
from Vim so that it compiles on the server. I'd like to avoid opening another terminal with a SSH connection to that server.
My question then is: is it possible to maintain a SSH connection through Vim?
Thank you
scp -r ~/.vim [email protected]:
? This would work well as long as your local and remote versions of Vim are reasonably close to one another. Runningvim scp://...
has many limitations.:make
.:! ssh myserver 'make'
. Works amazingly well with @Enzo's solution.:make
as opposed to runningmake
at a shell's prompt is to let Vim parse errors frommakeprg
and subsequently open a quickfix window.:! ssh myserver 'make'
doesn't allow that. shrug