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:
k h l j
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 /
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.