Last Updated: February 25, 2016
· supersymmetry

Vim Tweaking :: SPF13 the ultimate bootstrapper

Vim, even vim-tiny, is by itself a very strong programming tool. No modification should be required for a veteran to tailor make it using VimL to do any task. Whether it be code development or just text writing, the shell integration and structural (naming) of keystroke conventions and modular functionality make text entry a breeze.

There is a downside though. To my liking, the bare-bone vim, especially the trimmed-down vim-tiny packages, require a bit too much tweaking in order to get it 'right' as many familiar users would probably agree. Hence the (as I recall) more than 3000 plugins available for Vim. Given that fact and taken into consideration the native 'traditional' UNIX file structure of Vim, and you can imagine (experience) the mess your precious $HOME directory soon becomes.

Comes in Pathogen. Pathogen is a tool to fix this problem. Combine it with Vundler (easy plugin installation) NERDTree and a few others and soon you will discover the strength of SPF13 Vim. Steve Francia has bundled, configured and chain-strapped a whole bunch of them and I have to be honest: it's nearly perfect out of the box. For Linux users, it's easy to just clone the github repository using the following one-liner:

cd /tmp && git clone https://github.com/spf13/spf13-vim && bash spf13-vim/bootstrap.sh

You can also fork this repository or find out about installing in Windows are the instructions found at vim.spf13.com and to read more about configuration options add the #vimrc hashbang to the url.

Personally, I rotate a few different kind files to support my local user Vim configurations. This file is not present but the replacement .vimrc (native) configuration file is modified by spf13 bootstrap script.

vim ~/.vimrc.local

Which is where the (parent) .vimrc file will automatically look.

You can modify the process of chaining all bundles separately, as most Vim plugins can be found on github.com (so SPF13 just includes them as submodules - cloned at time you install it to ensure the latest versions/fixes) but not all will appreciate it's chaining setup (of spf13) nor will find it suitable for the fine-grained things they have in mind. I find myself usually defining multiple .vimrc.local files depending on the role of (myself) user and required job. In that case, assigning a specific Vim configuration becomes very easily accomplished using a symbolic link:

ln -s /path/to/roles/file/frontend-webdev.vimrc ~/.vimrc.local

And voilá. The file frontend-webdev.vimrc (or any other) can contain bundle reference through the use of VimL scripting, the Bundle command will trigger the inclusion of this add-on. Should it not exist, it will be queued for download.

Bundle "bash-support.vim"

To enforce the install of all packages in queue, use the command:


This ensures you will only download and install the packages in .vimrc and .vimrc.local any time. Also be advised you can share 1 set of many bundles across a (distributed) file system to support many different roles and users. The "Bundle" declarations in their .vimrc.local file will be the only ones loaded still. If you program in many languages like I do (or if you experiment a lot) this might be a nice thing for your vim load times ^^ Should you want to fine-tune more environment variables specific for a different programming tasks, using plain old UNIX user accounts and permissions will do the trick :)

Say Thanks