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:

[code lang=text]
git clone https://github.com/roaet/dot-files –recursive
[/code]

By doing it this way I can then just do the following steps to reconfigure my entire development environment:

[code lang=text]
cd dot-files; ./mastersync; source ~/.bashrc
[/code]

Some of these files work automatically after this (tmux, weechat, 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:

[code lang=text]
vim +BundleInstall +qall
[/code]

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).

Leave a Reply