Emacs and Vi

Mike Kozlowski has a thoughtful post on the lessons of Emacs and Vi(m). His thesis is that while the lessons of Emacs have largely been absorbed by those writing editors, those of Vi have not. Emacs versus Vi is one of our industry’s oldest religious wars, of course, but there’s a lot more heat than light in the skirmishes. Happily, Kozlowski has some some light to shed on the matter.

Kozlowski says that the big lesson from Emacs is extensibility and that “modern” editors have incorporated this lesson. Thus all the new editors have some sort of—I would argue inferior—extension language that allows you to customize the editor. It’s hard to argue with this and, indeed, I’ve said the same thing many times in this blog.

But what about Vi and its progeny? What everyone says about Vi—and don’t forget I was a long time Vi user before I switched to Emacs—is that it’s extraordinarily efficient at editing text. As Kozlowski explains, this is because Vi commands are composable. Thus the delete command can be composed with motion commands to provide a panoply of delete commands that all make sense once you know the command for delete and the commands for motion. If you now learn the command for copy, you can compose it with the motions command to have a suite of copy commands. Emacs doesn’t have this: every delete (say) command is different and has nothing to do with the motion commands. This is a powerful concept and goes a long way in explaining Vi(m)’s enduring popularity.

I believe that Emacs’ provision of a Lisp machine more than makes up for the advantages of Vi’s composability but no one can deny how super efficient you can be with Vi. As usual, we all make our own decisions about what editor to use but whatever choice you make it’s worth remembering that those on the other side have a point.

This entry was posted in General and tagged , . Bookmark the permalink.