Software and Other Stuff


28 Nov 2011

VIM config snippets

There are lots of things you can do to better organize your vim configuration, starting with using pathogen.

Apart from using pathogen, what I like to do is having small snippets of configuration on separate files to tweak specific things. Here's my .vimrc:

" Setup for pathogen.
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()

" Load additional plugin configurations and stuff
for rc in split(globpath(&rtp, "rc/*"), "\n")
  execute "source" rc
endfor

First part is the setup for pathogen. The second part is what I'm talking about, I go through every file in my .vim/rc directory and load every snippet of that folder.

A fun thing to try is to make every snippet "self contained". That way, if someone browsing your config thinks the thing you are setting up there is cool, all he has to do is copy that single file to get the specific piece of functionality.

BTW, since I use gvim most of the time, on the .gvimrc I just source the .vimrc, plus a few GUI tweaks (removing toolbars, menus, etc).

source ~/.vim/vimrc
" ... some gui settings.

Related Posts

28 Mar 2014
» Fun with Google's Apps Script! Batch Processing Gmail emails By Host
07 Oct 2013
» Graphs are Everywhere! An overview of GraphConnect San Francisco 2013
23 Jul 2013
» Using AngularJS with a Rails backend


The opinions expressed in this personal blog represent my own and not those of my employer. All data and information provided is for informational purposes only. This blog makes no representations as to accuracy, completeness, currentness, suitability, or validity of any information on this site and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use. All information is provided on an as-is basis.
adapt.960.gs  |  icons