Skip to content
August 2, 2011 / Rohit

A Change of Faith

The moment a child is introduced to Unix, he has to make a decision: which text editor to choose? In our time, there used to be only two options: vim and emacs. I chose emacs.

I chose emacs, because it let you edit text as soon as you opened the editor.  You didn’t have to press any special key for that. Moreover it didn’t have all those weird looking “~” symbols all over the screen. Who put them there?!

I have been using emacs for over 7 years now. In all those years, I never felt that I was using the editor to its full potential. I never learnt elisp. I had some customizations in my .emacs file, but not too many.

I did know how to navigate, search and do basic major/minor mode editing. My fingers had memorized all the major default keybindings: they would save the file every 5 seconds without even making me think. These key bindings were ingrained in me. That helped me use bash more effectively, as it has some of the same keybindings — you can do a reverse search in bash by doing ‘C-r <text>’.

But still there were some things which irritated me. Why did I have to type: ‘M-x regexp-search’ to do a simple regex search. Yes, I know I could have bound it to something. But I didn’t and there are so many other things which you have to go through the “M-x <command>”
route. It’s painful.

Then there is the startup time. 2 seconds on modern machines is just too much.

Two days back something snapped. I had enough of typing “M-x some_command” and hitting the TAB key frantically to let emacs tell me which command to use. That’s when I decided to give Vim another try. I had tried to learn it before but given up because I was so comfortable with emacs.

For the past 2 days, I have abandoned emacs and have been using vim for all my needs. Whenever I feel switching back to emacs due to something which I don’t find in Vim, I don’t.  Instead I search the interwebs far and wide for a solution. This time I am determined! This time I shall not compromise!

Learning Vim is fun. I find it surprising that it lets you have so much functionality right at your finger-tips. Take the “:r!date” command for example, which inserts the date at the current cursor position. The “r” portion says insert the result of whatever follows and the “!date” executes the “date” command on the shell. It’s really intuitive.

I am sure emacs has an equivalent “M-x insert-date-into-buffer” command somewhere, or does it? I am not sure. Maybe the old me would have hit TAB in the mini-buffer a number of times and scrolled through the bazillion command completions and not found anything.

The one thing which I haven’t gotten used to in Vim is text navigation. Coming from an emacs background, I find it cumbersome to switch back to command mode to navigate text (no, I don’t like using the arrow keys). Hopefully my fingers will adjust to it soon.

Will I abandon emacs forever? If yes, will it ever make a come back and take the throne of text editors? I have no idea. And you shouldn’t care.

Written on Tue Aug 2 21:29:18 PDT 2011.



Leave a Comment
  1. Ankur Gupta / Aug 2 2011 10:34 pm

    Join the club … 🙂

  2. mayasaietz / Aug 8 2011 4:38 am

    Yea, Vim is nice. I need to start doing more stuff on my Linux computer – have to use Windows at school, and it’s far too easy to just set up my school laptop in the living room and leave Linux and Vim alone.

    • Rohit / Aug 8 2011 8:55 am

      I don’t know if you know, but there is Vim for windows. You could also try out cygwin.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: