I cur­rently develop on a Win­dows machine. (You can cut the snick­er­ing.) There­fore, I don’t have the plea­sure of using Text­Mate. I’m also avoid­ing IDEs as a mat­ter of course when an edi­tor and CLI often avoids the bloat and sub­se­quently works faster. I first used Scite which shipped with InstantRails. I quickly moved over to jEdit when I switched to Rails on Cyg­win. With the right set of plu­g­ins you can quickly and eas­ily get a TextMate-like edi­tor. I decided to give Vim/GVim a try when I saw it in action. As much as I liked the raw power, things just didn’t make sense to me. When you learn to use edi­tors a cer­tain way, it’s hard to break old habits. Enter Cream.

Cream makes Vim act like your stan­dard, mod­ern edi­tor by clev­erly map­ping the UI from what you expect to what Vim expects. That said, you can also turn off Cream’s map­ping tem­porar­ily or per­ma­nently and make it act more like Vim. Should you desire to use straight Vim or GVim, you can do that as well. Cream eases you into Vim bet­ter than GVim does. In fact, GVim is more a mid­dle­man between you and Vim whereas Cream acts more like a translator.

Vim 7 has built-in stuff like folds and diff mode. It ships with the vim-ruby scripts which enables things like auto­com­plete and syn­tax high­light­ing for Ruby. Cream adds tabbed doc­u­ments (but I find them to be more cum­ber­some espe­cially now that I can use Alt-W 1 thru 9). Cream is nice because you can use your mouse for selec­tion and do cut and paste via Ctrl-X and Ctrl-V which one would expect. Then there’s the rails plu­gin that exposes many handy com­mands that hook into the fact you can call sys­tem com­mands so you can gen­er­ate a model or run a rake task from within Vim.

For all the stuff you get out of the box, Cream has some annoy­ances. For exam­ple, choos­ing a color theme for your syn­tax high­light­ing is, for the most part, lim­ited to the default ones pro­vided by Cream. You can hack the scripts to add your own or you can load one via a con­fig­u­ra­tion file, but that over­rides the abil­ity to use the color pref­er­ences. As for cre­at­ing a cus­tom color scheme, that is a pro­gram­ming task in and of itself. I do see the value of Vim’s all-keyboard method­ol­ogy (a con­se­quence of Vi being writ­ten before the mouse was invented). Once learned it’s very effi­cient. Though one thing that annoys the heck out of me is the choice for nav­i­ga­tion keys, pri­mar­ily for left and right. I can under­stand the point of main­tain­ing the hand posi­tions on the home­base keys, hence J being mapped to down, down being the most fre­quent nav­i­ga­tion. How­ever, com­ing from an arrow keys, numpad, and WSAD his­tory, the key map­pings for K, L, and H just aren’t that intu­itive to me. It would’ve been nice for DF to be mapped to left-right and JK to down-up thereby giv­ing each hand an axis to con­trol, or maybe IJKL be mapped sim­i­lar to WASD, but in either case, the one let­ter mnemon­ics for com­mands would be lost. Granted the arrow keys do func­tion, but that removes a hand from the home­base keys which isn’t all that effi­cient and if you’re doing that then a mouse would be just as good to nav­i­gate. Yes, it’s pos­si­ble to remap keys but then what hap­pens when you move to another machine with­out your customizations?

Still despite it’s short­com­ings, I think Cream will most likely replace jEdit as my edi­tor of choice on Win­dows. The short­com­ings are more than likely arti­fi­cial due to my lack of expe­ri­ence and prac­tice. There’s def­i­nitely a lot of fea­tures to go through and by far the worst annoy­ance is a lack of doc­u­men­ta­tion show­ing proper work­flow using Cream/Vim.

Update: I did find this Ruby on Rails, Vim, and rails.vim which is a remix of the RoR Cre­at­ing a weblog in 15 min­utes screen­cast.

Comments are closed.