I currently use vim in a telnet window for editing code (very old school!). There is a lot of source code (mainly C), so I use tags, cscope etc. to get around. This is ok as far as it goes, but network latency can make every keystroke "laggy", which is not so good!
I'd like to use gvim on my Windows PC (or any editor that can be set up to do this) to:
I'm a little familiar with vimscript, so I don't mind doing a little glueing. I thought that I can't be the only person who has ever wanted to do this - hence asking here.
Like I said - if there is any decent editor that has this "built-in", then I don't mind switching!
You can also use SSH to edit your file remotely with vim.
:e scp://remote.host.com/project/file
And then use SSH to call make remotely:
:!ssh remote.host.com '(cd project; make)'
ctags
In order to use ctags remotely, I would create the tags file remotely and copy it to the local machine and add scp://remote.host.com/project/ to each file name in the tags files. You can do this with something like
:%s#^\(\w\+\)\t#\1\tscp://remote.host.com/project/#
on the tags file. Then when working on a remote file you use ':set tags=local_ctags/tags' to reference the local (modified) version of the tags file.
'tags' option tells Vim where to look for TAGS file, though I'm not sure whether Vim allows ftp:// or scp:// paths in this option.
You can run commands on server using :!ssh ...
But don't you think it would be better to use one of the source control systems, work with files locally and then put updated files on server?
How about mounting remote directory localy? You can export it as an SMB share, NFS mount, or there are several equivalents of SSH filesystem (sshfs) available for Windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With