Protos Musings

In the long run men hit only what they aim at -- Thoreau.

Vim at 20: Simply the Best Text Editor

Earlier this week, on November 2, 2011, the awesome Vim text editor turned 20 years old. Vim started its life, as many of you might be aware, as the clone or imitation of the venerable vi editor created by Bill Joy – who went on to cofound Sun Microsystems – for Unix. It is a tribute to the genius of Bill Joy that his core ideas are kicking and thriving even 35 years after he created vi.

Vim was created by Bram Moolenar to fill a necessity – the version of Unix OS he was working on couldn’t use vi (due to strict copyright of vi) and so Bram had the option of either using one of the existing clones (all of which, as per him, sucked) or port vi. He, luckily for the rest of us, opted for option 2 and the rest as they say is history.

My interest in Vim was piqued sometime during the last 3 years thanks to the programming blogs I was reading via Google Reader. However since there was this notion that it is hard to learn, and since the benefit was not that evident (unless you stick with it for at least 4-8 weeks doing programming or text editing), I never took it seriously.

The turning point, at least for me, was July 29, 2010 when I read two awesome posts on Vim that not just made me very interested, but also reassured that there perhaps is no just one way to learn to using Vim. The first post was by Yehuda Katz: Everyone Who Tried to Convince Me to use Vim was Wrong. The second was by Rob Conery, an ex-Microsoft guy: Moving Your Mind Into Vim Mode. In fact Rob wrote that after getting inspired by Yehuda’s post. And after a few weeks, when I read Steve Losh’s post Coming Home to Vim, I was certain this is a skill that I should master - some day. Of course, I should not forget to mention another post that really caught my attention, by Derick Bailey: Using Vim As Your C# Code Editor From Visual Studio

Some time during last August or September I did download and install Vim, opened it, and didn’t spend too much time with it before giving up on it. But I did try out the Vim Kata posted by Rob: Vim Kata Number One. I must admit I found the going a bit tough and that was one of the reasons for giving up. Plus, there was the Visual Studio editor beckoning me to go back and use it to ”rot my mind” further, as Charles Petzold would say!

Anyways, long story short, I chickened out and didn’t take the time to learn or befriend Vim.

In 2011, I started focusing a lot on Ruby and Rails as the main programming platform. And no matter where I turn to, the default editor of choice in the Ruby and Rails world is Vim. I thought this was a good opportunity to at last start using and learn properly. During late February, I attended a Chennai Geeks session at ThoughtWorks, Chennai, by Vagmi Mudumbai on Rails followed by Siddharta Govindaraj on Django. Both of them are craftsmen and great programmers and both of them were using Vim for their live coding. I was sort of sucked right in and blown away at the same time!

Over the last seven months, I have been doing all my programming work (and now even this blog post writing) on Vim. Whenever I switch to Gmail to compose a long mail, I miss the power of Vim. I must say that I am both lucky and thankful to have finally discovered the power and sheer joy of using Vim. It is after all the only editor that is guaranteed to be available on almost any system [vi comes pre-installed in the Unix family of Operating systems (Unix, Linux, Mac OSX). On Windows we can download and install it.].

If you are someone who writes text or code for a number of hours every day, learning Vim would be a gamechanger for you. I am still learning Vim and people who have been using it for 10 years say that they are still learning something new every day, and I think I am a long way away from mastery.

I will leave you with a few more great articles, some of which came out on the occassion of Vim’s 20th birthday:

Two decades of productivity: Vim’s 20th anniversary

Two Decades of Excellence: Vim Turns 20!

Why, oh WHY, do those #?@! nutheads use vi?

Tim O’Reilly on 20 years of Vim

And last, but not the least, this awesome, inspiring story about how Mark O’Connor programs using just an iPad hooked to the cloud: I swapped my MacBook for an iPad+Linode

Happy 20th birthday, Vim!

And Happy Vim-ing, friends!

PS: I haven’t gone into why Vim is great or how it will make you uber-productive. For that you can click through and read the mostly awesome posts I have linked to above :).

PS2: If you have ever used j/k or n/p in Gmail or Google Reader for navigation, you can thank Bill Joy and vi for that awesome experience!