Pathogen, baby!
So there’s been some scuttlebutt on the Twitters recently regarding this “Pathogen” script for Vim and I decided to have a look. In a word? “Sweet”. In a few words? Tim Pope is the absolute man.
This is an extremely simple and elegant script. All it does is manipulate the ‘runtimepath’ but it has a nice focus on allowing you to componentize your Vim extensions into their own, private ‘runtimepath’ tree segments. So what? So what?!? Now you can easily upgrade your extensions by just deleting the old tree, downloading the package and exploding it in place.
This would have saved my ass when xptemplate went through a revision that deleted files, and I didn’t notice. Having unwanted, autoloaded files in place was not a good thing.
And you can also just toss git suppositories straight into this as well – perfect updating.
Check out Tammer Saleh‘s post called The Modern Vim Config with Pathogen for a concise description on how to get it into your vimrc.
marik:
October 12th, 2010 at 2:10 pm
There’s even a mirror of all vim scripts on github http://gmarik.info/blog/2010/09/24/vim-scripts-github-mirror!
Ryan Phillips:
October 12th, 2010 at 5:59 pm
Vimcasts has a screencast up on git submodules and pathogen: http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/
mcai8sh4:
October 13th, 2010 at 10:05 am
Just last week I installed pathogen, and spent a couple of hours trying to get it working properly (initially it was just my bad spelling!).
Whilst I’m back up and running, certain extensions don’t want to work, and they should. I have Nerd_tree (working fine) in ‘bundle/’ and snipmate (both in their own dorectories). Then I tried putting qbuf.vim, comments.vim and SearchComplete.vim in bundle/ and they didn’t work, so I moved them into individual dirs within bindle – still no joy. In the end I just created ‘plugin/’ and dumped them in there. It works, so I’m happy, but a little confused as to why certain ones don’t work in bundle/ – Any suggestions appreciated.
BTW – Welcome back!
-Steve
Derek Wyatt:
October 13th, 2010 at 11:22 am
Hey Steve. The answer is really quite simple: it’s the runtimepath. If you tossed those files into ~/.vim it wouldn’t work either; you would have to put them in ~/.vim/plugin. All pathogen is doing (effectively) is allowing you to have a lot of separate ~/.vim directories. Each individual one (i.e. each one in the /bundle/ directory) has to have a portion, or all of, the same directory structure as the main runtimepath directory.
So, ideally, you create bundle/vim-qbuf/plugin and put qbuf.vim in there, and do the same for the other “lonely children”.
mcai8sh4:
October 13th, 2010 at 12:33 pm
Thank you sir! All sorted, I don’t feel as dirty now. :wq
El racó del Ton » Blog Archive » vim links 2012-01-03:
January 3rd, 2012 at 3:10 pm
[...] http://www.derekwyatt.org/2010/10/12/pathogen-baby/ [...]
vim links 2012-01-03 » Writing thoughts:
May 10th, 2012 at 11:47 am
[...] http://www.derekwyatt.org/2010/10/12/pathogen-baby/ [...]