Avisi Blog

Why I switched to Emacs, but never left vi

Geschreven door Gert-Jan van de Streek | 30 January 2017

Because I feel there is a shortage on blogs, long opiniated comparisons and hateful flamewars on Emacs versus vi, I thought I’d write something about it myself. I am kidding of course (just in case you missed that joke). Some people, I know of 3 at least, including me, are free of all the anger and seem to use both editors. Both have their own strength and weaknesses and if you find yourself able to look rationally at both editors you will be able to double the joy of editing in using both.

 

#1 reason to use either vi or emacs for a specific task

emacs: Lisp support. Currently my coding life is pretty much all Clojure. Emacs pretty much embodies Lisp and the support for Clojure naturally followed.


vi: It’s always installed. Whatever *nix os you logon to, chances are way bigger you will find vi installed as opposed to emacs. Oh and maybe a second one here: opening large files. Where emacs warns you when opening a large file, vi just simply does it. Emacs takes forever to open a 30M file, vi doesn’t even blink. Larger files? Let’s not argue about it, you are not opening those to edit, just use less.

 

This blog post simply cannot hold the thousands of other reasons for either one, but you have your own.

 

Use both without going crazy on the keybindings

coming from vi: If you come from a vi background I would strongly suggest to look into Spacemacs. Spacemacs is basically emacs with vi keybindings. I would argue that Spacemacs is the peace answer in the editor war (although it might feel like Emacs won). The fact that most of your vi lizzard brain is satisfied by feeding it the right key bindings is a  great advantage.

 

coming from emacs: I have a feeling that this doesn’t happen too often. But really, spent some time on figuring out modal editing and the vi keybindings. When you learn a few, you can guess the rest. Probably after you grasp it, you will be looking into Spacemacs as well. There. World peace. It wasn’t that hard.