Can I easily keep my vimrc files consistent across multiple computers?

I have different computers (laptop, desktop home and desktop work) and I want to keep my Vim configuration consistent, including plugins.


A lot of tools provide solutions to keep your dotfiles (that is what your .vimrc is, a dotfile) up to date. Personally I use homeshick for this task. From its README.md:

By the power of git, homeshick enables you to bring the symphony of settings you have poured your heart into with you to remote computers

Homeshick uses Git, so your dotfiles are also under version control. Below a comphrensive outline how to work with homeshick:

# Generate a `castle` named 'dotfiles'.
user@local $ homeshick generate dotfiles
user@local $ git remote add origin git@github.com:username/dotfiles.git
user@local $ git track dotfiles ~/.vimrc
user@local $ git commit -m "Initial commit."
user@local $ git push origin master

On an other machine you can also install homeshick and clone your dotfiles:

user@remote $ homeshick clone username/dotfiles

Now you've dotfiles on your remote machine.

When you've edited a tracked dotfile you can commit it.

user@local $ homeshick cd dotfiles
user@local $ git add . && git commit -m "Update something."
user@local $ git push origin master

Update your remote machines:

user@remote $ homeshick refresh dotfiles

Here a link to my dotfiles.

Bonus Add homeshick refresh dotfiles to your ~/.profile, ~/.bashrc or ~/.zshrc and your dotfiles are always up to date.

| improve this answer | |
  • Does this work with direcotires as well (like .vim/bundle/) for plugins? – Karolis Koncevičius Feb 7 '15 at 19:14
  • Yes, it does. Although I recommend a plugin manager to manage your plugins. – OrangeTux Feb 9 '15 at 11:07

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