Like many people I have a repository that contains a vast majority of my configuration files, or dot files (because a lot of them start with a period). Doing this allows me to set up a new environment very quickly. While it probably is not standard practice it should be! At least it feels like a right of passage.
My collection of ‘dot files’ are located at github: https://github.com/roaet/dot-files.
This includes some git submodules and must be cloned in the following way to work properly:
git clone https://github.com/roaet/dot-files –recursive
By doing it this way I can then just do the following steps to reconfigure my entire development environment:
cd dot-files; ./mastersync; source ~/.bashrc
Some of these files work automatically after this (
bash) but one in particular needs more attention:
vim. Vim has plugins that need to be installed separately before they will work.
Wouldn’t it be nice if my
mastersync process could run a command to get vim to install all these plugins?
Hey wait you can!
Vim command from command line
The syntax is simple and, given that I use Vundle for plugin management, does exactly what I’m looking for:
vim +BundleInstall +qall
That’s it! The actual command to perform the installation is
BundleInstall and then
qall is there to end the vim process (otherwise it’d need to be quit).