Emacs and Vim are two of the most popular text editors used by Linux Users. The fight between Emacs and Vim has been going on for more than 35 years now, even before the modern Vim editor existed. With dedicated worshipers and haters of each software, it can be pretty hard for a new user to decide which text editor might be better for them.
Also read: 4 Best Terminal Based Text Editors for Linux
Emacs vs. Vim: A Detailed Comparison
So let’s try to break down the arguments from both sides and try to analyze which editor might be better for you.
History of the editors
The Emacs and Vim that we see today aren’t original pieces of software but forks of even older editors (as is usually the case in open source).
Emacs (Editor Macros) was developed by David A Moon in 1976 making it one of the oldest pieces of software which exists today. GNU Emacs which is the most used variant(fork) of Emacs was released in 1985 by Richard Stallman, the founder of GNU/Linux himself.
Vim (Vi Improved), as the name suggests is an improved clone of the
vi text editor. The
vi text editor was originally developed by Billy Joy in 1976 for the proprietary Unix operating system. Bram Moolenar later enhanced
vi and released it as
vim in 1991.
Both Emacs and Vim are completely free and open-source released under GPL compatible licenses.
This is the most important difference between the two software. Both Vim and Emacs while being text editors have different design philosophies and hence serve two different purposes.
Vim was designed to be the most efficient text editor ever. It has a very small footprint, will open up really quick, eliminated the need to ever touch a mouse (and even arrow keys), has hundreds of keybindings and commands to make the editing process fast.
It has modal support (normal, editing, visual, command mode) to navigate thousands of lines of code and make changes in just a few key-presses. For example, it just takes 55 keystrokes to count from 1 to 100 in word form!!
Emacs is designed to be far more than just a text editor. Instead, Emacs provides you with an extensive environment to work in. Usually, people who use Emacs don’t close it for the whole day. The text editor is just a part of the Emacs environment.
Emacs features a Turing complete language, Lisp with which you can write ANY extension you want for your Emacs environment. This way you can get everything that Vim offers in Emacs through the help of extensions.
You can take class notes in Emacs, access the file manager, use IRC, listen to music, make presentations, browse the internet, use a graphing calculator, play games, use Reddit, even edit videos, and much more. you can even open a bash shell INSIDE Emacs which means that you can even use Vim inside Emacs.
– Old Vim proverbEmacs is a great operating system, but it lacks a good editor
Both VIM and Emacs are super fast, especially when compared to modern-day Electron GUI text editors (like Brackets and Atom). There are arguments against Emacs being slower than Vim but the differences are very insignificant. Emacs takes around 1-2 seconds at startup compared to the instant startup of Vim. This however doesn’t matter since once you open Emacs, you don’t really close it until your workday is over.
3. Learning curve
The learning curve is one of the major deciding factors in which editor to choose or if it’s worth choosing.
Vim is notorious for its steep learning curve. This is large because of the unintuitive shortcuts and commands that it features by default. However, once you get the hang of it, it can increase your productivity exponentially. Vim offers features like vimtutor which can get you started with the basics in a couple of hours and overtime you will learn more advanced functions like macros and registers.
You might be tempted to change the keybindings to something more intuitive at the start but this is strongly discouraged. This is because the keybindings of
The learning curve of Emacs depends on what you want to do. The text editor while still being harder than usual is relatively easy to get started with (compared to vim). But text editor is just a small part of Emacs. Depending on whether you want to design an extension to integrate twitch chat to emacs just want to take class notes on org-mode.
The extensibility of any software is its backbone. Any software that’s not extensible dies with time when it cant adapt to the newer technologies. This however is not the case with Vim and Emacs.
Vim has a very active community that provides extensions and plug-ins for the software. You can add syntax highlighting, git support, fancy themes, file system explorer, etc. Through the extensions, it’s possible to add on the existing vim functionality and basically convert it into a fully-fledged IDE.
VimAwesome is a great directory to get started with plug-ins.
As we have seen before Emacs takes the idea of extensibility on steroids. You can add any extension your mind can comprehend and your hands can write. Here is a project which provides you hundreds of useful extensions including file manager, fast navigation, syntax support for multiple languages, browser, integrations to google search, google maps and google translate, blog setups, LateX, and PDF support, IRC support, Twitter integration and much much more.
Emacs even has a dedicated package manager to keep track of all the installed packages.
|Speed||Very fast||negligibly slower than Vim|
|Learning Curve||Steep||A bit easier (but usually depends on the task)|
|Extensibility||Has plugins to help with development||Is basically an operating system. Insane amount of extensions|
Vim is a dedicated text editor and it does the job very very efficiently. Its minimal, fast, straightforward, and should be your go-to if you are looking for a productive text editor for any job
Emacs on the other hand is a bag of tools. It also has a text editor, calculator, IRC integration, etc. If you are willing to spend time to set the whole environment up, it can be very very productive and worthwhile since you basically never need to leave it.
- Emacs Editor Tutorial – An Absolute Beginners Reference
- Vim Tutorial – All You Need, To Get Started with VIM
- VIM Plug – The easy way to install plugins in VIM
- Why Emacs?
- Interesting Vim puzzles