Everyone has their own perfect setup, their perfect
PS1 prompt, their perfect color schemes and vim plugins.
Its a pain to configure that setup everywhere. That’s why I store my dotfiles on github. It takes a bit to set up, but once you have it – it is super convenient.
A lot of people are versioning their entire
/home/:user directory, but that seems like way overkill, and a complete misuse of public repositories. What I do is clone that repository into
~/.dotfiles, and then use symlinks to bring the shared copies into
~. I symlink every file or directory that I want my special copy of onto that machine:
$ ln -s ~/.dotfiles/.vimrc ~/.vimrc $ ln -s ~/.dotfiles/.vim ~/.vim $ ...
I use these across machines, so when I do things like apply patches to ~/.vim files or change my PS1, I can just run a
git pull to update it everywhere.
It’d also be really easy to write up a few scripts that just run through the symlinks I typically like on MacOS, Linux, etc. I haven’t gone that far, but
-f would allow you to write the symlinks regardless of whether they exist so you could make updates painless.
This also makes it really easy to share with people that like parts of my setup, and vice versa. That’s all!