Report inadequate content

Synchronize your VIM configuration across different machines


If you are a Vim user, chances are that you also work with several machines, and you spread the same configuration over them.

I do share my vim configurations between Windows, Mac and Linux and store the same configuration for all the environments in my Dropbox folder. The idea is to have a central place where I can manage all my Vim installations, and then link it. Easy as that.

I synchronize .vimrc and .vim using Dropbox, but many other forms are possible, such as Ubuntuone, Sugarsync or any other cloud service you might have. And even a GIT/SVN/Mercurial/whatever repository based storage that you update from time to time.

How it works?

Put all your vimrc and vimfiles in a centralized place. I use:

~/Dropbbox/DotFiles/vimrc [the plain text configuration file]
~/Dropbbox/DotFiles/vimfiles [the directory]

Then in every machine, I have the ~/.vimrc (_vimrc in windows' gvim) with a single line, referencing the configuration stored in the dropbox folder. I could directly link the file, but sometimes you may want to add a couple more of lines specific to a machine. The content of the ~/.vimrc file is just:

source ~/Dropbbox/DotFiles/vimrc
# Additional stuff specific to the machine here...

This will include the vimrc stored in my Dropbox folder. Finally, I just create a symbolic link to the vimfiles folder:

ln -s  ~/Dropbbox/DotFiles/vimfiles ~/.vim

Now, apply this steps to all machines you have, and whenever you change your .vimrc or install a new plugin will be available to all your installations.


Leave your comment Synchronize your VIM configuration across different machines


User avatar Your name