Unleash your inner root


More than an editor, A way of life.

Every keyboard cowboy out there has their favorite editor. On the windows side you will hear a few murmured debates between Visual Studio, Eclipse, Notepad++(for the simpler folk) and a few other editors that likely deserve an honorable mention that I cant recall…

On the Linux side it often comes down to EMACs and vim. Those in the emacs crowd tend to have the belief that EMACS is the Chuck Norris of Editors: “Emacs does anything I want it to do. It checks email, it will make me a sandwich, it once cured cancer” (oh, if you couldn’t tell by the snark, I’m a vim man myself.) Here is the problem: Do one thing, and do it well. THAT is the *nix philosophy. I firmly believe we should live by it.

Emacs is too much. Yes, it solves a LOT of problems, but guess what, It doesn’t solve those problems better than other tools that were specifically designed to solve those problems. Is it a good editor? heck yeah it is. It’s a great editor but its slow to load, and lets face it: its not vim.

Vim on the other hand lives and dies by the *nix prime directive. It is an editor, and its a damn fine editor at that. “But Brandon,” I hear you Emacs fan’s saying, “Mode driven editors are slow by comparison to the superior ‘always ready to edit’ awesomeness of Emacs.” To that I say: You are doing it wrong. I can switch between modes very quickly. Ctrl-] drops me back from insert mode to command mode, which is a single ctrl press, vs emacs that requires I control or meta key press all of my additional functions. Yes, it is convenient in a hypothetical sense that not having to switch between modes in EMACS to move around is a time savor, the reality is though, if I need to move around, it is likely going to be a several key press process.

Lets look at the differences here in a basic movement level.

With emacs your basic movement is accomplish as such:

ctrl-n # next line
ctrl-p # Previous line
ctrl-f # Forward a character
ctrl-b # Back a character

That seems pretty logical actually, n for next line, p for previous f for forward and b for back. at a glance that seems good, especially compared to vims key’s that at a glance seem rediculous. I mean hjkl…What the heck is that even mean? But then you stop and think of your keyboard as a number pad:

h    l

You’ve already memorized those key’s forever now. I don’t have to explain them. You will never forget them.

Emacs on the other hand…was it…ctrl-u for up a line, and ctrl-d for down a line? no no no, Its next and previous, of course…is next and previous next character previous characteR? or next line previous line?

This is the problem with using a key that equates to a word. While it makes sense, and once you build muscle memory you’ll remember it, it has a logical problem during learning that leads to frustration. With Vim the key’s are all lined in a row and map directly to the arrow key’s that you are already familiar with. The letters themselves don’t matter you just remember that your right hand stay’s on home row.=

That feeling of simplicity turned wrong extends to everything else in both directions as well. In vim searching for a word is as simple as using / while in command mode. / pattern spaces are a long reoccurring theme in the unix/linux world, and it serves to re-enforce a thought process across multiple applications. I figured out how to search in vim purely by accident because pre-pending it with a forward slash for pattern space simply made since. Beginning of the line? As with regex and other unix/linux standards ^ for beginning of line, and $ for end of line. It BUILDS upon a foundation that is established in time old traditions, learning these things extends to so much more than vim.

Emacs on the other hand is, again, simple…ctrl-s for control search. But again, to the novice trying to learn, is it ctrl-s for search, or ctrl-f for find? hmm… In most of the world ctrl-f is for find, thats how you would do it in your browser, or in many other editors that use ctrl-key shortcuts… its logical that you would assume ctrl-f is the correct key combo, but its not. as for beginning and end of line, ctrl-e for end of line, makes sense, ctrl-a for beginning of line…doesn’t make much sense….

I’m not saying that vim doesn’t ever use letter to word functionality, after all I cant deny that e for end of word, b for beginning of word, exist. In those cases, yes, there is potential for confusion. My point is simple this: At the basic level there is a certain brain mapping that happens naturally with vim, that simply is not there with emacs.

Now the final bit of the joy’s of thinking in mode vs always on editing. Every key is a potential shortcut. The power to customize is so great, I can set a macro for almost any single key, or ctrl-key, or meta-key and because i have modes, I have far fewer basic functions tied to complex key combinations, so it allows me to expand my customization further without having to resort to ctrl-meta-f r c c c m to make it happen.

And lastly. Know this. If you are an EMACS fan I say this: Had I learned Emacs first…I likely would be claiming vim is backwards and makes no sense, and that vim fan boy’s like myself are crazy. So know that I attack your editor only in jest, and bare you no ill will. That being said…Vim rules, emacs drools.

humorvimvim vs emacswhy vim is better

Brandon.Graves • December 28, 2015

Previous Post

Next Post


  1. reverett December 30, 2015 - 4:42 am Reply

    EMACS RULE! Just because you can’t control the awesome power of its genie, doesn’t mean that your little barely-an-editor VIM is better! 😀

    • Brandon.Graves December 30, 2015 - 10:51 pm Reply

      Some people just can’t admit when they’ve been living a lie… Poor soul.

Leave a Reply

Your email address will not be published / Required fields are marked *

%d bloggers like this: