Doom Emacs: An Emacs For Vim Users

Doom Emacs: An Emacs For Vim Users Hero Image

If you’re in the market for a fast and dangerous text editor with all the bells and whistles you’ve probably looked at Vim and Emacs and, maybe, shook your head and gave up. They’re too old, too difficult, yet somehow intriguing. But which one to choose? They both have their pros and cons.

Why not do both?

Intro to Vim

The vi editor, pronounced “vee-eye,” better known by its later iteration, Vim, is one of the world’s most popular free text editors. Free, because you don’t even need to download it, it’s already installed in your operating system.

Vim is a screen editor, as opposed to a line editor. In the old days, line editors could only let you edit one line of a file at a time. For some applications, this was good enough, but more complex documents demanded more visible editing space. Screen editors allowed the user to view a whole document (or, parts of it, if it’s a long document) full screen.

Vim is also a modal editor, meaning it has different “modes” you can switch in and out of. This is where a Vim novice will quickly get tripped up. You can’t simply start typing words into Vim the way you can in Microsoft Word or any popular word processing software. In order to type words you need to switch into “insert” mode. Now you can insert text. And once you’re done inserting text, switch out into “command” mode to start performing commands upon the text you’ve inserted.

This may sound like a tedious and laborious process, and it is, but once you get used to it, Vim can rapidly improve your text editing workflow. Many complex commands are built into a few basic keystrokes, which means you can move around your document and edit text at much higher speeds.

Because it is small, portable, and very popular, Vim is included on virtually every operating system you may ever use. This means if you learn Vim on one computer, you can take that knowledge with you everywhere you go. For example, if you “shell” into your InMotion Hosting VPS server, you’ve got Vim available. Likewise, if you log into a different server in a different location, managed by a different host, you will still have Vim at your fingertips, ready to accept your commands.

This begs the question, why would you want to choose any other obscure modal text editor? Now it’s time to take a look at Emacs.

Vim Vs. Emacs

Emacs and Vim are not exactly competitors in the realm of obscure text editors. Both are free, customizable, and inspire heated debate among their users. It’s best to think of Emacs and Vim as representing two completely different philosophies for approaching work—each with their own unique set of benefits and drawbacks.

“In the GNU/Linux world there are two major text editing programs: the minimalist vi (known in some implementations as elvis) and the maximalist emacs. I use emacs, which might be thought of as a thermonuclear word processor. It was created by Richard Stallman; enough said. It is written in Lisp, which is the only computer language that is beautiful. It is colossal, and yet it only edits straight ASCII text files, which is to say, no fonts, no boldface, no underlining. In other words, the engineer-hours that, in the case of Microsoft Word, were devoted to features like mail merge, and the ability to embed feature-length motion pictures in corporate memoranda, were, in the case of emacs, focused with maniacal intensity on the deceptively simple-seeming problem of editing text. If you are a professional writer – i.e., if someone else is getting paid to worry about how your words are formatted and printed – emacs outshines all other editing software in approximately the same way that the noonday sun does the stars. It is not just bigger and brighter; it simply makes everything else vanish.”

–Neal Stephenson, “In the Beginning was the Command Line” (1998)

The Vim philosophy, like the classic shell scripting philosophy, is all about brings small tools together to accomplish a job. The Emacs approach is more all-encompassing, encouraging its users to bring everything into Emacs—like a Swiss army knife, but exponentially more cumbersome. You’ll often hear the nerdy quip: “Emacs is a great operating system with a decent text editor.”

The typical Emacs user is a hard mold to capture, because there are no typical Emacs users. People with obscure and divergent interests tend to take up Emacs because it is like a blank slate, you can configure it almost from scratch to do virtually anything according to the open software philosophy: it’s general purpose tech, so make it do what you want it to do without unnecessary constraints. Developers use emacs, and so do novelists, CEOs, academics, scientists, and journalists.

Emacs, like Vim, is a modal text editor. And, like Vim, Emacs uses simple keystrokes to invoke complicated functions. However, the Emacs modes are much bigger. Instead of merely switching between an insert and command mode, Emacs provides an unlimited assortment of “major” modes that completely alter the program based on what kind of work you’re doing.

For example, if you’re coding a website, you could enter “web” mode. If you’re writing a C program, you could use “C” mode. There is a different mode for virtually every kind of work you might want to do with custom key commands mapped to helper functions based on the mode you’re working in.

Because the major modes are so huge, there are also “minor” modes to accomplish smaller functions within various major modes.

Here’s where it gets confusing. Emacs has a major mode called “evil” mode, which is a special mode for Vim users. Why would Vim users want to use Emacs?

An Emacs Configuration For Vim Users

Emacs is more than a text editor. You can use emacs to do everything from managing todo lists, organizing an event, logging into servers, listening to Spotify, watching YouTube, launching websites, blogging, balancing your budget, and much more. Unlike Vim, Emacs has a rich user interface, so you don’t have to use it from the command line. Actually, Emacs users recommend not using the terminal version of Emacs.

However, like learning Vim, there’s a learning curve involved in properly learning Emacs. A lot of it is simple finger exercise. But if you’re already accustomed to the Vim key commands, you may be discouraged from learning a whole new set of Emacs commands.

That’s why a group of Vim users got together and ported Vim key commands over to Emacs. In order to use the Vim key commands you just need to install Emacs and install the “evil” major mode.

Doom Emacs Introduces Vim Explorers to the Alien World of Emacs

So now, you have Emacs and it works similarly to Vim but you have all the other nice features of Emacs. But, it still looks like something you might see on old Amiga computer. Basic Emacs, right out of the box, needs a facelift to look like today’s more streamline editors—with nice fonts, attractive syntax coloring, and other finer embroideries.

Here is where the Doom package, “[an] Emacs configuration for the stubborn martian vimmer,” simplifies the process further. Doom is a pre-configured Vim configuration for Emacs plus a whole lot more. It includes:

  • A contemporary interface with a retro feel
  • Popular Emacs packages for productivity, coding support, and more
  • Vim or Emacs configuration options
  • A built-in elisp library to simplify custom coding

Computer gamers from the 90s will appreciate the tribute to iD software’s popular Doom, the brainchild of legendary game developers John Carmack and John Romero.

An Investment of Time and Effort That May Pay Off

Doom makes it easier for an Emacs novice to get a workable and highly-functioning emacs configuration going. But, learning any flavor of Emacs still requires a significant investment of time. There’s so much you can do it’s overwhelming to simply decide what to do.

And yet, Doom is basically someone else’s Emacs configuration loaded in your system. So you will, over time, see a need to customize it to your own work—or maybe start from base Emacs.

One thought on “Doom Emacs: An Emacs For Vim Users

  1. Pingback: Doom: An Emacs For Vim Users | WP FeedBack

Was this article helpful? Join the conversation!

Leap into Savings
Leap Ahead with Limited Time Deals