What is the best way to sync my vimrc to multiple computers, I have multiple different linux and windows installations that I would like it to be synced to and would prefer to rely on some sort of cloud based system. Currently I am using dropbox, but it seems like dropbox will only sync stuff actually in the dropbox folder. I would prefer for this to happen in the background, but if I have to run a script that won't be a problem.


I keep all of my dot files (including my .vimrc and my other .vim stuff) in a git repository. I then have a script which creates symlinks in my home directory to all of the config files in my git repository. As long as it isn't too many files, I imagine you could manually generate those symlinks if you had to. The nice thing about this setup is that when I pull into the config repository, all of my config files in my home directory are updated, since they are just symlinks. You could do a similar thing with dropbox by having symlinks into your dropbox folder. I would recommend writing a script which can crawl a dotfiles subfolder in your dropbox folder and generate the needed links. Since you are on both Windows and Linux, you may need two scripts, one which uses mklink and the other which uses ln -s respectively. For more information on how this can be done, checkout this lifehacker article. Once you have these links (or have your script generate the links), when dropbox automatically updates your files, the changes will be automatically happen to all your machines. The only catch is that if you add a new file (rather than update an existing one), you'll need to remember to re-run your symlink script.

  • If you use git instead of dropbox, the last point about needing to rerun the link script upon getting a new file can be mitigated with a post-merge git hook script which adds missing links.
    – jlund3
    May 11 '15 at 16:47

If you always have 1 source, you could write a quick script to copy it to your clients, then put that into a cron job.

  • I guess I could keep one source in the dropbox folder and have scripts to sync it right next to it, I was hoping to have some solution that would work more like dropbox, but sync to ~/.vimrc and $HOME/_vimrc Feb 12 '13 at 20:00
  • @PeterMichealLacey-Bordeaux There might be. Are you looking to have the vimrc files able to be changed on all machines, or are you looking to mirror based on a source machine?
    – Kruug
    Feb 12 '13 at 20:06
  • I would like to be able to change them on all machines Feb 12 '13 at 20:06

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