When I find a neat new trick to put into my Vim settings file, it’s a pain to have to install it across my various machines. It’s especially a pain when I reinstall a machine. The solution came to me - use Git to version control and distribute my settings.
A nice little benefit to this approach is that, using GitHub, I can share these settings so folks can figure see the neat shortcuts I’ve enabled. A word of warning if you start doing this - don’t version control your secrets! There are bots scraping GitHub for all kinds of passwords and tokens, so your accounts could be compromised in a matter of minutes.
To drop this on to a new machine, I use the following:
cd ~ git init git remote add origin email@example.com:dafyddcrosby/dotfiles.git git pull origin master
Check out my dotfiles.