I keep my vimrc
in a git repository on my home firewall, which is accessible
via SSH.
This makes it easy to bootstrap a new workstation:
[jason@foo ~]$ sudo brew install git [jason@foo ~]$ git clone --recursive jason@home.eraserhead.net:/srv/git/my_stuff.git [jason@foo ~]$ echo "source ~/my_stuff/vimrc" > ~/.vimrc
Assuming you have plugins and not just a solitary vimrc
, Vim needs to find
other plugins installed within your repository. I have a vimfiles
directory
in mine and added this to the top of my vimrc
:
let &runtimepath = expand("<sfile>:p:h") . "/vimfiles," . &runtimepath
This works well enough that I haven’t touched it in a few years, in spite of having twiddled and written a few plugins. Remember that some plugins like CommandT will need to be built on each system.