CommandT on Ubuntu 11.04 & 11.10

Vim has a pretty awesome fuzzy search plugin, named after the TextMate shortcut, CommandT. Installing it is fairly straight forward, but it crashes pretty bad on Ubuntu. After some reading I found out it is because Ubuntu ships a version of vim with flaky Ruby support.

In order to recompile I installed the following packages:

sudo aptitude install python-dev ruby-dev mercurial ncurses-dev liblua5.1-0-dev lua5.1

I then followed Kresimir Bojcic’s instructions on building from the HG repo and ended up with vim in /usr/local:

hg clone https://vim.googlecode.com/hg/ ~/vim 
cd ~/vim
hg update -C v7-3-154
./configure --with-features=huge  --disable-largefile \
            --enable-perlinterp   --enable-pythoninterp \
            --enable-rubyinterp   --enable-gui=gtk2 \
            
make
sudo make install

With a new vim installed I followed the *command-t-installation* instructions and so far it has been stable.

Update 2012-01-16: After installing 11.10 I found that vim doesn’t have ruby support at all. Following the instructions above worked like a charm.