acm-header
Sign In

Communications of the ACM

BLOG@CACM

Time To End The vi/Emacs Debate

If you still use Emacs, I feel for you. Perhaps it is time to give vi a try.

View as: Print Mobile App Share:

There has been a long-standing debate among programmers. It is as fierce as the Hatfields/McCoys, Jets/Sharks, and Michigan/Ohio State feuds. Programmers continue to argue over the best text editor: vi or Emacs. For the past 42 years, programmers have dug in on either side, with practically no hope of switching. I must disclose that I have been using vi since 1987. I still remember my classmates arbitrarily picking vi or Emacs. I tried emacs back then and did not like it. Maybe I did not give it a fair chance? Well it is too late now. I am in the vi camp for life.

Now the developers have spoken. Today, Stack Overflow released its 2018 Developer Survey Results. Vim, the improved version of vi, scored 25.8% in popularity, while Emacs scored a paltry 4.1%. That is a staggering difference. To further gauge popularity, I counted 22,582 questions tagged with vim and 15,667 questions tagged with Emacs on Stack Overflow. You could argue that fewer questions means higher usability. I interpret this as an indication of activity.

I know the Atom and Sublime Text editors are all the rage today. But what made vi appealing to me 30 years ago still holds true today. I really like the short, simple commands. I rarely need to take my hand off the keyboard. To delete a character, type ‘x’. To insert a character, type ‘i’. If you still type Ctrl+x, Ctrl+s to save a file, I do not think we can be friends. I like how my brain has been hardwired to vi. I probably cannot describe most of the vi commands to you, because using vi is like breathing: you just do it. MIT and Stanford each have nice little vi reference cards that fit on a single page. The GNU Emacs reference card is twice as long. Invoking the emacs editor requires three additional letters; those extra keystrokes add up over time. Finally, vi is a cool name. I have a cousin who goes by Vi. Have you ever met anyone named Emacs?

If you still use Emacs, I feel for you. Perhaps it is time to give vi a try. I consider myself lucky for picking vi from the start. You can try to convince me to use Emacs, but you will have an easier time convincing me to go back to Visual Basic.

Edwin Torres is a full-time software engineer at The MITRE Corporation and an adjunct professor of computer science at Monmouth University. Follow Edwin on Twitter @realEdwinTorres.


Comments


Brent Auernheimer

I use emacs versus vi as an example of modes (or not) in interfaces. I am a vi person from way back (1978) because I don't have a problem with keeping track of what mode I am in, compared to remembering which multi-key chord I need to remember to do just about anything useful in emacs :)

I have my students read this from 2001: http://www.hillside.co.uk/articles/C2/SE.C2.OCT.01.pdf


Edwin Torres

Brent- Thanks for the comment. That's a good PDF guide. I remember using emacs back then to edit multiple files in the same window. Of course you can do that in vi as well. I'm glad you're teaching your students emacs. It's nice to have a classic editor in a classroom environment.


Tim Menzies

I'm a long time vim/emacs nerd but I gave up emacs 2 years ago.

What convinced me was not the merits of the editors (they are both great) but the ease of customization. IMHO, vim .vimrc tweaks are far less freakier than their equivalent emacs .emacs counterparts. The list of packages at https://vimawesome.com/ is truly awesome with better browse around support than the emacs MELPA site.

So I would say that if the emacs people want to return from 4% to 25%, then they need to work on better packaging and community support.

To that end, let me say "well done!" to the spacemacs project (http://spacemacs.org/). Spacemacs is "just" some config files for emacs. But it is a great set of customizations. Maybe more spacemacs-like experiments could entice me back from vim to emacs.


Edwin Torres

Tim- Thanks for the comment. That's a great point about customization. I'll stay in the vi/vim camp like you.


John Nash

As someone who got used to Turbo Pascal's editor, I use joe. (I think there might be someone whose name sounds like Linux ....) Is the argument not simply "It's what I'm used to". There was a joke that when Nigeria switched from driving on the left to the right in early 1970s, truck drivers were given three days in advance to practice. The non-joke was that people's habits are to go to the "wrong" side, and those habits are tough to change.

But is it important what editor is used as long as the file format is well-defined and all the editors save conforming files?

JN -- who built his first computer in 1961.


Edwin Torres

John- Thanks for your comment. I like your analogy. Which editor you use is really not important, as long as you are effective with it. This is just a classic debate in programming, and it is simply about bragging rights. ;-)


David Smith

Thanks for the article, but is this trolling?

@Tim Menzies, I studied under you at WVU so many years ago, hard to imagine we are engaging here to discuss vim vs. emacs nearly twenty years later. While at WVU, I convinced my ACM programming competition team to all use emacs, then two years later I had switched fully to vim, and five years after that I was back using emacs, and with org-mode for organizing and mu4e for e-mail, it's truly wonderful.


Edwin Torres

Hi David. Thanks for the comment. The article wasn't intended to troll. It's purpose was to resurrect a classic debate among programmers. The idea came from the recent release of the 2018 Developer Survey Results by Stack Overflow. I understand the article is a bit tongue and cheek. I was only doing that for creativity. Judging by the discussions I've seen in other forums (e.g., Dev.to), the debate is alive and well.


Tracy Mallory

There are only three features I like about vim: it's default colorization tends to be better than emacs, it starts up quickly, and it's almost universally available. I detest the modal input behavior. The default emacs for most systems is pretty good these days, and the power commands including go-to-next-[error/search-result] and macro command definition are IMHO much better. Let the debate go on!


Edwin Torres

Tracy- Thanks for your comment. I would say I have a love/hate relationship with vi. But I'll never stop using it.


Displaying comments 1 - 10 of 14 in total

Sign In for Full Access
» Forgot Password? » Create an ACM Web Account