Get Rid Of Command T

Hardcore text editors always seem to make a concerted effort to actually ease the opening of different files. Perhaps the most elegant solution was implemented by Textmate by hitting Command-T. A drawer would open from the top of the window, the user could begin typing in the name of a file and eventually hit enter to open it. Other editors have exibited this functionality and the guys and gals at PeepCode even built a handy app that sits in your menu bar to do the same thing.

If you were a Vim/MacVim/GVim user you had one of two choices to mimic this functionality.

  1. Use the PeepOpen application which is pretty cool and definitely worth the money, although it requires a plugin to function with Vim
  2. Use a plugin (Vimball in this case) named Command-T

The issue with Command-T came down to the fact that it needed to be compiled with the system Ruby and so did your version of MacVim. Well, that's cool, most people are ok with using OS X's version of Ruby because it is up-to-date…wait, nope! For the intelligent person using RVM or RBENV, you needed to make sure to switch off from Ruby 1.9.2 and back to the system ruby when updating MacVim via Homebrew or compiling the source.

All of this was a serious pain in the ass, trip-plicated by the fact that MacVim is yet to see a golden, stable release for 10.7. In the most simple of cases, plugins can be installed by throwing a couple of files and a doc file(help text) into their respected folders. This action is what makes using Janus(Yes I know it is somewhat frowned upon but I don't happen to care, sorry) such an easy package manager. However, if you look how it handles Command-t you should be instantly filled with complex waves of hatred or…at least this.

Enter CTRLP! An elegant and easily installable solution that could care less about your Ruby implementation. After just a day and a half of random playing, I am thoroughly impressed and suspect that Command-T won't make it's way back into my Vim belt. Although, I have massive respect for the Vim user who keeps trying to wrestle the beast.

Download CTRLP from the githubs, add it to your .janus.rake file with: ...or use your Vim package manager of choice.