Like every Vim user, I have spent years tweaking my .vimrc. But when I connect to a server elsewhere, I'm back to plain, vanilla vim.

It's still a great editor, and I can still get things done, but I'm wondering: is there a way to edit remote files using my local copy of Vim?

link|improve this question

62% accept rate
feedback

3 Answers

It is possible to edit remote files with vim. You want to use netrw. Do :he netrw in vim to learn the details.

link|improve this answer
1  
+1 since this directly answers the question – karategeek6 Mar 2 '11 at 18:19
feedback

Copy your .vimrc to the server.

Many people keep their dotfiles (.vimrc, .bashrc, .muttrc...) in a Git/Hg repository, updated by cron. This way all servers always have the latest changes.

link|improve this answer
Yes, this works even better if your home directory is on an NFS mount shared by all the servers. – Rob H Mar 2 '11 at 16:18
Pulling the latest with cron is a neat idea. I guess each user on the server could have their own .vimrc synced to their home directory... – Nathan Long Mar 2 '11 at 17:54
1  
I would like to add that I find it easiest to put every vim file under .vim, put that folder on git, and symlink any files (such as vimrc) that need to be placed elsewhere. – karategeek6 Mar 2 '11 at 18:17
feedback

You could investigate fuse (Filesystem in User Space) and fusefs-ssh - mount a remote directory locally using ssh.

Then you can mount the remote server's directory locally and edit the files using your local computer.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.