Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Macvim over ssh

My project involves working on a large codebase on a remote server. I'm constantly editing multiple files, so scp'ing files back an forth is not possible. I've got my local Macvim setup just the way I like it, with multiple plugins including ctags.

It is at all possible to use Macvim over ssh in such a way that I am easily able to browse to and open files from within Macvim running locally?

Getting ctags to work without it being installed on the remote server would be even better but I suspect not possible...

Also an issue is the fact that the remote server is setup with someone else's .vimrc that I don't want to use, but can't overwrite.

like image 712
skeletalmonkey Avatar asked Mar 16 '11 05:03

skeletalmonkey


People also ask

Does vim work over SSH?

Vim/NeoVim is just an editor but it relies on scp and ssh to provide access to remote files. So whenever you can ssh into any Linux box, you can also locally edit the file, while remotely saving that file into the remote server.

How to save file from SSH?

When you're ready to save the file, hold down the Ctrl key and press the letter O: (Ctrl + O). The bottom of the prompt asks you to confirm the name of the file, which is already set as index. html. Press the Enter key on your keyboard to save.


1 Answers

The following command will open a file in MacVim over ssh:

:e scp://[email protected]/path/to/file 

I suspect this might not be completely what you're looking for as it will only give you one file at a time.

If you could mount a share from the target system locally that would work as well.

like image 169
Cody Avatar answered Oct 06 '22 00:10

Cody