Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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

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

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.

share|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
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. – cledoux Mar 2 '11 at 18:17

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .