Thomas Mayfield bio photo

Thomas Mayfield

Polyglot programmer who loves the weird beautiful chaos of humans building software together. Currently spending most of my time in Ruby and Javascript, while dabbling in Clojure and Elixir.

Twitter Github

Fixing conflicting Vim plugins with NeoBundle

I started messing around with Clojure this weekend and quickly discovered that something in my Vim setup was causing parentheses matching with % to not work quite right. The output in the statusbar showed a call to ruby-matchit, a plugin that lets you jump between between the start and end of blocks and method definitions in Ruby. As wonderful as that is, I certainly don’t need it while editing Clojure.

As it turns out, there’s a fork of the Vundle plugin manager called NeoBundle that supports lazy loading and initialization of plugins. You can do this with the following in your .vimrc:

NeoBundleLazy 'vim-scripts/ruby-matchit'
autocmd FileType ruby NeoBundleSource ruby-matchit

Switching to NeoBundle from Vundle was a breeze, and now vim-matchit only loads when I open Ruby files. Hooray!