Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

3 Answers 3

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  
+1 since this directly answers the question –  karategeek6 Mar 2 '11 at 18:19
add comment

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
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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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