If you can’t get Command-T plugin to work, or you can get it to work but it breaks Vim frequently with the friendly message noted down, than this post might help you out of your misery…
|
I’ve determined two main causes for couple of hours of grief
- Ubunutu 11.04 Vim build version is 7.3.35 and it has kinda flaky Ruby support with nasty habit of crashing Vim in combination with Command-T on some distributions (Command-T is partially written in Ruby)
- I have multiple Ruby versions (via RVM). Vim was build with 1.8.7, and I was ‘making’ plugin with 1.9.2 Ruby binding. It turns out this was not such a good idea
First off all you need newer Vim build than the one that is present on Ubunutu 11.04 (you need to have Mercurial installed in order to fetch Vim, I guess Moolenaar has to use Mercurial, since he is employed at Google). Easiest way is to compile it from source, while enabling Ruby support at the same time. I had some strange problems with build version 189 so I’ve chosen build 154 (As I’ve said Ubuntu default is build 35, and they fixed the bug somewhere in between build 35 and 154.)
|
Check the Vim:
|
Make sure that after checking Vim version you see +ruby, and also make note of version of ruby used (1.8.7, 1.9.2), I got it to work with both but it is important to use same Ruby version when installing the plugin…
Get Command-T script from Command-T Vim page. If you’ve already tried to install Command-T you can implode it (you could say remove it, but it doesn’t sound nearly as cool)
|
Then open plugin installer with Vim
|
While in Vim type :so % into command line and get out of Vim with :q to finish the install
|
Enjoy the Command-T magic, make sure to steal some cool mappings from Destroy All Software. I have particularly ‘Custom Rails mappings’ in mind…
–