It all started with CoffeeScript. Like all languages I play with, one of my first step is to look for a Vim syntax file. Thankfully, the CoffeeScript page itself links to kchmck‘s vim-coffee-script on github. So far, so good.
Here’s the first step:
Wait … what?! I hate having to install software to … install software. At this point, I was ready to close the tab but it was a tpope project. That’s usually a sign of quality. I was ready to give this pathogen thing another look.
So … pathogen lets you dump “bundle” directories under ~/.vim/bundle/ and will setup the various Vim variables so that the plugin, ftplugin, syntax, ftdetect are all hooked up correctly. That’s nice; it solves a lot of the pain I’ve felt over the years about trying various vim plugins and messing with my setup.
In theory, you would do something like:
And add at the top of your .vimrc:
filetype off
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
That’s pretty close to how I have it setup. While I was making my mind about pathogen, I found Tammer Saleh’s post about pathogen. Besides the details I outlined above, he suggests git cloning the repository and removing the .git instead of playing with git submodules. I could not agree more. Of course, I have to deal with that situation only because my ~/.vim is under git. (like all my dotfiles, read more)
I simplified his script for my own purposes: (on github)
refresh() {
local url="$1"
local dir="$2"
rm -rf $dir
git clone $url $dir –depth=1
rm -rf $dir/.git
if [ -f "$dir/.gitignore" ]; then
rm "$dir/.gitignore"
fi
}
refresh https://github.com/scrooloose/nerdcommenter.git nerdcommenter
refresh https://github.com/vim-scripts/matchit.zip.git matchit
refresh https://github.com/tpope/vim-haml.git vim-haml
refresh https://github.com/timcharper/textile.vim.git textile
refresh https://github.com/kchmck/vim-coffee-script.git vim-coffee-script
I think the --depth=1 on the git clone is a nice touch … especially since I delete the git directory right after the download. The CoffeeScript plugin is working well and it keeps being committed to. The refresh script is quite useful.
I’m planning on packaging a few of the plugins I wrote and “bundle” them too. (vim-slime)

I am currently using submodules in my dotfiles repository for bundles, and am not really excited about having to track submodules changes whenever I update the bundles. I took a look at your dotfiles and it seems that when you get a bundle, you start tracking the contents on your own repository. This is the kind of duplication that I was trying to avoid in the first place. What do you think about adding a .gitignore to all your cloned directories that basically makes git ignore these directories in the dotfiles repo? It would come as a step right after deleting the original .gitignore. The only drawback is that you have to run your refresh script right after cloning dotfiles.
I don’t mind tracking the bundle files. In fact, I have do that for years. I used to manually download, pull apart and integrate the files with my own dotfiles. As such, the new bundle subdirectories are a big step forward in the maintenance, over large periods of time, of the dotfiles.
I know which files work as I expect … the ones I committed with my dotfiles. And, if I refresh a plugin, the changes will be available in the diff.
I’m not sure what I would gain by not tracking the files.
Hello, I think your blog might be having browser compatibility issues.
When I look at your blog site in Ie, it looks fine but
when opening in Internet Explorer, it has some overlapping.
I just wanted to give you a quick heads up! Other then that,
amazing blog!
Heya i am for the first time here. I came across this board and I find It truly
useful & it helped me out much. I hope to give something back
and help others like you aided me.
Its like you read my thoughts! You seem to grasp a lot approximately this, such as you
wrote the book in it or something. I think that you can
do with some p.c. to power the message home a bit, but instead of
that, this is great blog. A fantastic read. I will definitely be back.