Brendan Dawes
The Art of Form and Code

Sync Vim Configuration using Dropbox

My day-to-day coding machine is my iMac which over the years I've setup with my perfect (for me) Vim configuration. When I'm out on the road and working on my Macbook it's important that my Vim setup is exactly the same as on my main machine, so I can just start from where I left off, with the configurations that I'm used to.

I came across this great post about syncing Vim configuration via Dropbox and I've been using it ever since. I've detailed the steps here as well:

First make a folder in Dropbox called vim and then copy your existing .vimrc from your home folder to this new folder, renaming the file to vimrc.vim

Next edit your original .vimrc in your home folder and replace all the contents with these two lines:

set runtimepath+=~/Dropbox/vim
source ~/Dropbox/vim/vimrc.vim

Now when Vim starts up it will see the original .vimrc and be directed to use the vimrc.vim file in your Dropbox. Make sure you setup the .vimrc in the home folder the same on all the machines you want to sync your Vim configuration.