Making the jump: Textmate to VIM

August 17, 2011 in Technology

Despite a recent clean install, my faithful travel companion has pretty much had it. I guess I shouldn't be too surprised, since I dragged it out of deep storage just for this trip, but the good news is I'm upgrading to a shiny new MacBook Air later this week. I'm looking at this as an opportunity to tighten up some of my computing habits, including -- brace yourself -- switching to VIM.

Why? Because it feels like every single day I read another post on how amazing it is, and because Textmate, my trusty workhorse, is getting a little long in the tooth.

With no sign of Textmate 2.0, I have come to the sad realization that it's time to say farewell. This is a tough decision, because Textmate does just about everything I need. It's the most Mac-like editing experience I've ever seen (and that's a very good thing). It handles every type of file I work with, and the bundle system is so powerful that I can write interfaces for those random programs it doesn't work with, like IPython 0.11. Articles like Watts Martin's "Text Editor Intervention" calmly told me that it was ok to stay with Textmate.

And also, it's pretty.

This, I'm almost embarrassed to say, is the number one thing that keeps me attached to Textmate: I like looking at it. There, I said it. Interface is beyond important to me. If I don't enjoy looking at a program, I won't work in it. It's that simple. Say what you will, that's just how it is.

And here's the thing: VIM is ugly. Really ugly.

Most people try VIM and run screaming for the hills the first time they try switching modes and accidentally erase a line. Me, I can't even bring myself to type. What is this abomination of garish colors and contrasty highlights? I know vi dates to the 80's, but come on! 

Anyway, with the new computer on its way -- and it's not easy getting one of those things to Israel, my current location -- I decided to give VIM another shot. Encouraged by the combined experiences of Daniel Fischer and Henrik Nyh, I held my virtual breath and typed brew install macvim. In particular, I really appreciated that Daniel's post began with the following:

"I’m a visual person. The editor that I use must be visually appealing to me, and visually reflect sexy code. This is how I interact with my material, and if it doesn’t look pleasing then I am turned off and cannot be productive. This is one of the reasons why I picked Textmate from the beginning, the themes made the code look really attractive."

(Then, he decides the default icon is ugly and makes his own. I'm not quite that crazy... but I will use his icon.)

When the world failed to end, I began to load the Janus plugin bundle and while that was happening I followed the consensus  advice and fired up the vimtutor. I was pleasantly surprised as I worked through the tutorial -- the black on white colorscheme was acceptable and I could see the appeal of the key commands, even as I struggled to learn them. My initial frustrations ("This is a TEXT EDITOR -- why is it so impossible to EDIT TEXT?") melted into appreciation that maybe there was a better way.

But it's still ugly. I'm working on that, though.

I'll miss Textmate, with the sole exception of undo-ing one character at a time (I mean, really?!). I'll probably keep it around as a general purpose file editor -- I know, I know... but it's going to be a little while before I'm totally fluent in VIM, and I've got things to do! Plus, I did pay for it -- $30 and five years ago, but who's counting?

Anyone out there have some helpful suggestions for a VIM novice?

{ 18 comments… read them below or add one }

GHL August 17, 2011 at 8:59 am

Why not try emacs? It’s not quite as jarring as VIM (if you start it up and type, it actually writes the words your typing) but is arguably just as powerful (regular expression replace, multiple simultaneous windows, running shell commands within emacs). And it’s fully customizable (that is, if you’re willing to deal with lisp… yikes). Not that I want to start an emacs vs vim war.

Reply

J August 17, 2011 at 9:38 am

This will sound like an anti-intellectual answer (I swear, I will beat that meme to death), but I found that Googling “switch textmate vim” brought up considerably more friendly tutorials than “switch textmate emacs.” They say things like “with training wheels,” which I like, and seem to be genuinely written with a beginner in mind.

…I’m afraid I don’t have a better answer than that.

There’s a lot of posts out there that say I’m ridiculous to even abandon Textmate in the first place (the “Intervention” article I mentioned earlier, and also ones like this), but I made the decision when I realized that IPython 0.11 broke Textmate support and I had to write my own bundle to get them to work together — a highly duct-taped contraption of Applescript and bash. I decided that I didn’t want to be so far out of warranty, and if I’m going to be writing code in order to code, I might as well do it with the support of a community — and that’s when I did the searches I mentioned before.

Reply

Toby Segaran August 17, 2011 at 5:50 pm

One unexpected advantage to knowing VIM is when using an SSH console on a mobile device or tablet, which usually don’t have full keyboards (e.g. no arrow keys because navigation is usually done by the touchscreen)

Reply

J September 7, 2011 at 2:39 pm

Great point.

Reply

mj baloc December 10, 2014 at 12:04 pm

just add me or call

Reply

mj baloc December 10, 2014 at 12:06 pm

09156800720
09156800720
09156800720
09156800720

hotbabes just call me or tx anytym if u want

Reply

jkmacc August 18, 2011 at 10:46 am

+1 for VIM, I have to say. I’ve become so used to it that I switched to vim keybindings in tcsh with “bindkey -v”. That’ll teach you pretty quickly how to keep your modes straight! :-)

Reply

mario negrello August 30, 2011 at 12:40 am

Although in my case TM and vi peacefully coexist, i do understand your choice. Vi is pure magic — how the finger-sparks feel during vi incantations can’t be beat.

Here my favorite source of spells:

http://vim.wikia.com/wiki/Best_Vim_Tips

Reply

J September 7, 2011 at 2:43 pm

Excellent jumping off point, thank you

Reply

Jack Kinsella September 7, 2011 at 1:24 pm

I urge you to give VIM another try considering the recent wealth of information on how to replicate Textmate features and set up sensible defaults. I wrote an extended guide on the switch, called Textmate to VIM.

Reply

Jack Kinsella September 7, 2011 at 1:25 pm
J September 7, 2011 at 2:44 pm

This is a great resource, thanks Jack

Reply

mario negrello September 8, 2011 at 5:57 am

Because Vim is only text, it is only as ugly as the font in the terminal and the colormapping. Font: Anonymous Pro. For colormaps , I’d recommend iTerm (which also conveniently has visor features and does multiple frames).
Vini Vidi Vi!

Reply

Dionysis February 21, 2012 at 10:45 am

Hey there :)

Vim ugly? I think you meant to say “Vim’s defaults are ugly”. They are! They are so ugly that I would never choose to work using them. But the nice thing is that you can customise vim and then it becomes really really beautiful. I actually found TextMate ugly when I returned to it after using vim for a few months.

It all comes down to personal taste of course but check this colour scheme:

http://blog.toddwerth.com/entries/8

Then remove all gui elements from MacVim (place in your .vimrc):

” remove the ugly scroll bars and hide the toolbar and the graphic tabs
set guioptions-=r
set guioptions-=L
set guioptions-=T
set guioptions-=e

try to run that full screen ;)

Reply

J February 21, 2012 at 8:20 pm

Thanks Dionysis — you’re right, I’ve really come to like Vim’s look once I got around to messing with the gui options.

Reply

Deborah November 6, 2014 at 4:03 pm

?ey there! Do you use Twitter? I’d like to follow you
if t?at woul? be okay. I’m ?bsolutely enjoying your blog and look f?rward to neew updates.

Reply

mj baloc December 10, 2014 at 12:07 pm

09156800720
09156800720
09156800720
09156800720

Reply

mj baloc December 10, 2014 at 12:09 pm

09156800720
09156800720
09156800720
09156800720
09156800720

Reply

Leave a Comment

Previous post:

Next post: