Vim and Emacs are perhaps the oldest and most legendary “brotherly” conflict in the world of text editors. Some say: “People are divided into those who know Vim and those who know pain and suffering.” Others counter: “Emacs is actually a full-fledged operating system that just lacks a good text editor.”
Let’s try to dive into the history of this confrontation and collect interesting (and sometimes crazy) facts about Vim and Emacs.
Why is the battle “ancient”?
Vi was born in the late 1970s in the UNIX environment. It was originally a modification of ex created by Bill Joy, co-founder of Sun Microsystems.
Emacs was born in 1976 thanks to Richard Stallman, who combined several macros for the TECO editor (which, by the way, is where the name Editor MACroS comes from ).
Both of these editors have gone through decades of evolution. Nowadays, the name Emacs most often refers to GNU Emacs, and vi usually refers to Vim (Vi Improved), which was created by Bram Moolenaar in the late 80s.
Vim in 1993
Fan Wars (or the Religion of Text Editors)
Vim users are said to see only one real path: commands, modes (Normal, Insert, Visual) and a magic key Esc
that determines the rhythm of work.
Emacs proudly proclaim: “It’s not just an editor, it’s an operating system where you can do anything from reading email to playing Tetris.” Yes, you heard right, Emacs has built-in games.
There is a meme: “Emacs is eight megabytes of constantly expanding SWAP .” This is, of course, an excessive reference, because in reality Emacs has long been “eating” more memory (now it can be hundreds of megabytes!).
Vim has its own pride: where else can you drive a newbie crazy when he gets stuck in the editor itself and doesn’t understand how to exit it? “Help, I can’t exit Vim!” has become a classic joke.
Vim vs. Emacs and Productivity Myths
Vim is known for its ease and speed. Fans claim: “If you write code in the console on a slow VM via SSH, Vim will still not let you down.”
Emacs is often called a heavyweight, but this does not stop the community from adding new features to it - a built-in chat, a mail client, a browser, an organizer (Org mode) and even DOOM Emacs (a quick configuration of the editor in the style of the game DOOM).
Benchmarks pop up periodically, comparing which opens large files faster or how economically it uses memory. In reality, much depends on the user’s habits and requirements.
Extensions and Plugins
In Emacs you can:
- Play Tetris, Snake, Pong and more.
- Read mail via built-in Gnus.
- Listen to music.
- Use Org mode to plan your life.
Vim also has a lot of plugins, although they are less “gamey” :
-
Chat in Vim - There have been several attempts to make the editor serve as a messenger.
-
Vim-Beats or “musical” plugins.
-
Tons of games including tile collection 2048.
-
Turn the status into Nyan Mode (see picture below).
The cat shows your position in the file
Useful but confusing: mods and hotkeys
The biggest pain point for beginners: how to switch between modes?
- Vim has at least three main modes: Normal, Insert and Visual. Plus “God knows how many” more exotic ones (Command-line, Select, Ex, etc.).
- Emacs does not rely on modes, it uses key combinations like
Ctrl + X, Ctrl + C
(exit),Ctrl + X, Ctrl + S
(save), etc. The finger muscles quickly learn the new position, although at first it all seems strange.
Fun fact: Emacs has “evil-mode” and “viper-mode” that emulate Vim-style work. And Vim has plugins that make “Emacs-like” bindings. In fact, you can turn Emacs into Vim or Vim into Emacs, which sometimes confuses people.
Bearded jokes
How to exit Vim?
A meme that has been following the editor for years. People joke that it’s easier to turn off the computer than to remember to press Esc
, then type :q!
and press Enter
.
Real question on stackoverflow
Emacs as an operating system.
“You can do everything in Emacs, even brew coffee if you attach the right extender.” It sounds funny, but fans really do manage to read news, write code, make ToDo lists, and even stream on Twitch using Emacs.
Ctrl+Alt+Shift + …
Legends about complex key combinations in Emacs… Sometimes it seems that for something elementary you need to press all existing modifiers.
“I’ll load Emacs”
Jokes about Emacs starting up slowly, and during that time your entire life has time to “run” by. However, this is no longer so relevant in the era of fast SSDs and fast processors.
What about advanced features?
Emacs is easy to modify using the Emacs Lisp language : you can create the craziest functions and packages - from auto-generating documentation to writing your own games.
Vim uses its own scripting language, Vimscript , and can also work with Python, Lua, and other interpreters for powerful plugins and automation.
That said, both editors are completely Open Source . And each is full of subtle quirks like meta-registers, letter buffers, and key sequences that are hard to track down.
A curious moment in historical evolution
- GNU era : Emacs played the role of a flagship project along with the GCC compiler and other tools of the FSF (Free Software Foundation).
- vi/Vim evolution : Over time, vi was upgraded to Vim by Bram Moulenaar, and for many years now Vim has supported full-fledged plugins, a graphical interface (GVim), and other conveniences that help it keep up with the heavyweight Emacs.
In other words, we see how two projects followed parallel paths, but each time surprised the world with strange and incredible decisions.
Vim vs. Emacs: So Who Wins?
The answer is obvious: nobody . In reality, many developers keep both editors in their arsenal. Sometimes it’s convenient to open Emacs for complex integration with the environment, and sometimes “fast” Vim saves when you need to edit a file in seconds.
At the same time, there is a third category: users who have been working in Visual Studio Code, Sublime, JetBrains IDE for a long time (yes, there are also plugins that emulate Vim or Emacs). So the “war” has long ceased to be a duel, turning into a celebration of choice.
Sources and additions
- The official Vim website (lots of documentation and a fun FAQ about exiting the editor).
- EmacsWiki is a huge collection of tips and tutorials, from setting up email to creating games.
- Richard Stallman and his stories about how Emacs was born (you can listen to the interview and podcasts).
- Bram Moolenaar , the author of Vim, spoke about the philosophy of the editor (especially the modal editing mode) in one of his talks.
Conclusion
Vim vs. Emacs is a unique story about how two completely different approaches to text editing have been “battling” for over 40 years. Each has its own magic, fans, myths, legends, and layers of crazy facts. Of course, the winner of this battle is always at the discretion of the user.
But we know for sure that if you are ever asked how to exit Vim or why Emacs needs a built-in Tetris, you will be able to answer with a smile and, perhaps, introduce your interlocutor to one of the funniest (and in some ways even epic) confrontations in the world of IT.