Sign In

Communications of the ACM


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.


Daniel Douglas

Vi and emacs have never shard the same goals - at least not since the early days. Most vi implementations are basic minimal editors meant to satisfy the standard and provide a uniform general purpose editor for unix. It was convenient to simply add some interactive sugar around ex and call it the standard editor for the system. ex is still essentially the only standard way to programmatically perfrom many file manipulation tasks from a shell script, aside from ed, and being able to carry over that functionality into the editor is rather neat.

However, it's really only vim that has seriously tried to fill the role of emacs as a heavyweight programmers tool.

I'm not an emacs expert, but vim still makes it very difficult to build simple composible functions into commands during interactive editing the way I expect a scheme-based editor might, so I'm tempted to give emacs a try. Vimscript is a horrible language and the other embedded scripting languages aren't integrated in a way that makes them easily accessible while editing. Possibly neovim has made some improvements in that area. I haven't had a chance to explore it.

Edwin Torres

Daniel- Thanks for providing some history on the editors' goals. Interesting.

Devon McCormick

It's no wonder that software continues to be so poorly-designed when a modal interface like vi's is accepted without question.

Edwin Torres

Devon- Thanks for your comment. I've always felt that you can create great software with any plain text editor or IDE. vi happens to be my favorite text editor, mainly for familiarity and nostalgia. And you can easily create poorly designed software with advanced IDEs like Eclipse and Visual Studio Code.

Displaying comments 11 - 14 of 14 in total