Baptiste Fontaine’s Blog  (back to the website)

How to speed-up Vim’s Command-T plugin

Command-T is a wonderful Vim plugin which allows you to open files with a minimal number of keystrokes. It’s really handy in a large codebase where you only have to type <leader>t, then a couple letters and press enter to open your file. It’s based on a fuzzy matching, which let you skip letters without worrying.

I recently installed the plugin on another machine and noticed it was really low: I had to wait a couple seconds to get the files list everytime. My computer has 8GB RAM so the problem wasn’t there.

The solution is pretty simple: the plugin relies on a C extension which I forgot to compile after the installation.

From the docs:

cd ~/.vim/bundle/command-t/ruby/command-t
ruby extconf.rb

It’ll make the plugin incredibly faster. This step is easy to miss if you read the docs too quickly. I wrote this blog post to remember this, I hope it might help a couple others since I didn’t find anything on Google about this issue.