Monthly Archive for May, 2013

My super awesome vim config

So, I finally got around to figuring out how to come up with a easily transferable vim configuration. You can find it here on Github.

I had one major issue that I was trying to figure out how to solve for quite some time. I wanted my [cci]~/.vim[/cci] to be a Git repository. But I also use pathogen to manage my plugin bundles, many of which themselves are Git repositories. Not all of them are, though. Some of them are Mercurial repositories and others are just straight up directories. As you know, putting repositories inside repositories is a Bad Idea. WHAT DO?!

One option is to make all of the bundles that are Git repos submodules. I think that’s a stupid idea for two reasons:

  1. I disagree with tying a VCS with the stuff it’s trying to keep track of. Not everyone wants to make their Vim plugin a Git repo and converting all non-Git-repo plugins to Git repos also just seems like the Wrong Solution.
  2. This is not what submodules in Git were designed for. Seriously. There is no well-defined functionality in the Git user interface for removing a submodule. Using submodules for this purpose is just a bad idea.

So, perhaps I should just go with Vundle? Well that still doesn’t solve the first problem.

Of course, some stupid part of my brain told me to write my own solution. So, I created vim-pandemic, a program that lets you easily add, update, and remove bundles from lots of different types of sources. Now, all I have to do is keep a database in [cci]~/.vim/pandemic-bundles[/cci] and every time I copy my configuration over to a new computer or whatever, I can easily just run [cci]pandemic update[/cci] to grab all my bundles. Yay!

I should also mention that there is a similar program written in Ruby called epidemic. I actually discovered this when I was trying to figure out how to name pandemic. It doesn’t do anything more than Git, though.