Why Emacs?

After a couple of months of using emacs as my primary editor I’ve finally settled down. I am as comfortable now with emacs as I was with vim when I made the switch. With that in mind, I feel like I need to explain why I’m sticking with it. Hopefully I’ll be able to convey this in a way that a vim power user might appreciate.

I understand now that comparing vim and emacs is ridiculous. Vim is an editor. Emacs is a host for running elisp applications.

When I was a vim user I thought it was nonsense that so many emacs users claimed that they hardly ever left emacs. Now it’s perfectly clear to me why they’d make such a claim. When you start using applications within emacs (such as an irc client, news reader, or calendar) you suddenly have a single, unified set of keybinds across all of your tools. Switching between chat windows and switching between text files use the exact same mechanism. Even switching between applications works the same way. Chances are you will probably be editing some text in those applications. Since you’re already inside emacs you get a familiar set of editing bindings –including your personal configuration– for free, in every application. This is something I’ve fought for years to achieve.

Another reason I consider emacs to be more of an environment is that it was designed from the ground up to be extended. Emacs provides hooks (similar to autocmd events in vimscript) for almost anything you can think of. These allow you to run arbitrary elisp when specific events happen. On top of that, elisp allows you to modify literally any function to add functionality without having to rewrite the entire function. This is called “advising” the function. The power that this gives you is really hard to convey because there isn’t any concept of this in vim.

I’m not an advocate of pushing people into making the switch to emacs. That being said, Magnar Sveen summed up my thoughts pretty well in one of his talks on Emacs Rocks:

God damn it, you’re a programmer. Start using an editor you can damn well program.

blog comments powered by Disqus