Configuration sharing with Dropbox, Part 1: VIM
Introduction
This article explains how to easily share your .vimrc and all the plugins,
color schemes, and syntax highlighters that you use between all your
workstations.
If you haven’t done so already, please read Part 0 first. Go ahead, I’ll wait.
One-time set-up
First, let’s set up a VIM folder in your Dropbox:
- Create a folder called viminside your~/Dropbox/config.
- Copy your existing .vimrcfile to this folder, and rename it tovimrc.vimso the file doesn’t get hidden if you’re on OS X or Linux.
- Copy the entire contents of your ~./vimrcfolder into this new folder.
 Note! If you use the Command-T plugin, take care not to copy anything related to that. These are native, platform-dependent files, and can’t be shared, unfortunately.
- Add a file called vimrc.localto the folder, with the following contents:
  if has('win32') || has('win64')
    set runtimepath^=$HOME/Dropbox/config/vim
    source ~\Dropbox\config\vim\vimrc.vim
  else
    set runtimepath^=~/Dropbox/config/vim
    source ~/Dropbox/config/vim/vimrc.vim
  endifPer machine set-up
Next, for each of your computers, you should do the following things.
- First of all, if you want to use the excellent Command-T plugin, go ahead and install that first. It needs to compile stuff to native code, so unfortunately, it’s not portable across machines.
- Next, copy config/vim/vimrc.localfrom your Dropbox.- On Linux and OS X, move it to ~/.vimrc.
- On Windows XP,move it to C:\Documents and Settings\[your username]\_vimrc.
- On Windows 7, move it to C:\Users\[your username]\_vimrc.
 
- On Linux and OS X, move it to 
- From now on, ~/Dropbox/config/vim/vimrc.vimis your master.vimrcfile. You can make all your changes there.
- If you find any external plugins, color schemes, or syntax highlighters on
the Vim Tips Wiki, just drop them
into ~/Dropbox/config/vimwhere otherwise you would have dropped them into~/.vim.
That’s it!
