The holy war over which text editor is best is one of the longest-running arguments you’ll find online. My understanding is that back in the day it used to be Emacs vs. vi (or vim (or even neovim)). Now it’s vim vs. Visual Studio Code. Same shit, different day.
jcs over at irreal.org has a post defending vim in response to a dumb thread on r/programming asking if there’s any reason to use Vim (or Neovim) other than to look cool. It’s a dumb question, which is reason enough for it to have been removed from Reddit, but it came with a spammy poll.
Here’s what jcs has to say:
This is Irreal rising in defense of Vim. That may seem strange for an Emacs-centric blog but I’ve always said Vim and Emacs are the two best editors and which one you choose depends on whether you want a lightweight, very fast editor or a Lisp Machine-like environment that provides an entire operating environment. I like them both and have spent many years with each of them.
What I don’t like are those who have never put in the effort to master either editor spouting off about how they’re old technology and only fools and graybeards use them instead of the ever-so-great, bling bedecked, hot editor of the day.
For my part, I’m mainly an Emacs dude. I like it because it’s a solid (though still single-threaded) virtual Lisp machine that just happens to include a decent text editor. I particularly like to use it for composing new text and code, but it’s solid for revision and refactoring as well.
However, I can and often do also use vim. Sometimes Emacs isn’t available. Sometimes I want to be particularly precise and careful in my revisions, and I find I’m more comfortable using regular expressions in vim. Sometimes I need to edit a file on somebody else’s server via SSH. Having basic proficiency in vim means I’m not wholly dependent on Emacs.
Now, somebody might object to my example of using vim in ssh to edit a file on somebody else’s server and ask, “Why not use TRAMP in Emacs?” That’s a reasonable question, but in the situations I have in mind TRAMP in Emacs isn’t necessarily the right tool for the job. If I shell into a corporate owned server and edit the file in place, I don’t have to explain to some clueless suit that I don’t actually have any of their proprietary data lingering on my machine because they’ve probably never even heard of TRAMP. I get in, I do the job, and then I get out.
Finally, I mainly use Emacs at home, for personal computing. My day job is at a Microsoft shop, and I do .NET development for my sins. It’s less hassle to just use Visual Studio, especially since I’m not paying for the license, than to persuade the management on every project I join to let me use Emacs. It doesn’t help that Emacs feels a lot slower and jankier on Windows than it does on GNU/Linux or macOS, and I’m not sure if the problem is Windows or that Emacs on Windows is not a particularly high priority for the Emacs dev team.
Regardless, I don’t use Emacs or vim to “look cool”. The coolness ship sailed off without me long ago, rammed an iceberg, and sank with no survivors. I use them for the same reason I use GNU/Linux, BSD, macOS, etc. As Neal Stephenson wrote about UNIX in In the Beginning was the Command Line:
After this kind of thing has happened several hundred or thousand times, the hacker understands why Unix is the way it is, and agrees that it wouldn’t be the same any other way. It is this sort of acculturation that gives Unix hackers their confidence in the system, and the attitude of calm, unshakable, annoying superiority captured in the Dilbert cartoon. Windows 95 and MacOS are products, contrived by engineers in the service of specific companies. Unix, by contrast, is not so much a product as it is a painstakingly compiled oral history of the hacker subculture. It is our Gilgamesh epic.
What made old epics like Gilgamesh so powerful and so long-lived was that they were living bodies of narrative that many people knew by heart, and told over and over again–making their own personal embellishments whenever it struck their fancy. The bad embellishments were shouted down, the good ones picked up by others, polished, improved, and, over time, incorporated into the story. Likewise, Unix is known, loved, and understood by so many hackers that it can be re-created from scratch whenever someone needs it. This is very difficult to understand for people who are accustomed to thinking of OSes as things that absolutely have to be bought.
If UNIX is a certain kind of techie’s Gilgamesh epic, then I think one might argue that vi and Emacs are the Iliad and the Odyssey of UNIX editors. Never mind that both were originally built atop ed/ex and TECO respectively. If a far more elite hacker than I will ever be needed vi or Emacs but didn’t have it available, they could probably re-create it from scratch.
There’s a certain comfort in using these venerable old editors, something akin to going down to the shooting range with the pistol or rifle that one of your ancestors carried when they went to war. There’s a sense of history and of latent power in such a tool, as well as the implicit knowledge that if Richard Stallman can do the vast majority of his personal computing in Emacs, then the editor can probably handle whatever I ask of it. Likewise with Bill Joy and vi. Hell, you could probably say the same about Rob Pike and Plan 9 editors like sam
and acme
.