Emacs is so underrated

What initially sparked my interest in Emacs was that it was used so little (among developers). At this point, I used Emacs and Vim a lot and I chose Emacs for text writing (I'm not a programmer) for Markdown (mostly this website), HTML (my private journal), and Org (structuring any information). I tried Doom Emacs and yet I'm using vanilla Emacs with 45-line config, of which 11 lines are comments. So, in this post, I'd like to comment on the following:

  • Doom Emacs and Spacemacs: the Good and the Bad
  • Writing texts vs. programming and the vi-mode
  • Using Emacs' modes
  • Current state of Neovim development vs. Emacs
  • Emacs extensions, are they really useful
  • Use cases where Vim is unbeatable

It's not a 'Emacs vs. Vim' article, I just try to structure my thoughts. Let's start then.

Doom Emacs and Spacemacs: the good and the bad

There are lots of great things about Doom Emacs and Spacemacs. And first of all, I'd like to say that the concepts and the products are great, from my viewpoint. Notably, for the following:

  • These products initiated a new wave of interest towards Emacs and maybe inspired lots of other products, including LazyVim
  • It's a lot easier to install packages in these products, especially when you need a lot of extensions
  • They add a fresh look to a really old product, which is valued by new users

There are some drawbacks though, which made me stay with vanilla Emacs, because I use only a few modes and extensions:

  • Both are environments, made for someone else's needs, not mine
  • At least Doom Emacs isn't very stable
  • I'm totally fine with the Emacs standard package installation method

I started tuning vanilla Emacs, got what I wanted in a few hours and I'm still satisfied with that. But let's take a step back and look at my requirements.

Writing texts vs. programming and the vi-mode

I write texts, and I spend a lot more time writing than editing text. I just have some ideas, I need to put them into files fast. In programming, it's different, I assume, especially when you do some code refactoring. So I don't need to switch to 'edit mode' (in any editor) very often. I'd rather prefer to enter 'edit mode' temporarily, fix a few things and then just continue writing the text. I need to minimize distraction and be able to move and fix things ASAP and think about my ideas and not about how to edit the text. I have vi keybindings in my muscle memory and still I'm more comfortable with Emacs vanilla keybindings.

The second thing about 'vi modes' in Emacs is that Emacs modes have 'Emacs-style' keybindings. On the contrary, vim plugins have 'vi-style' keybindings. But mixing these two drives me crazy. Yes, in Emacs you can customize any keybindings, but there are lots of them in just 4 modes I use (including plain-text editing). I assume it's not worth wasting my time on that. And even if you customize the keybindings... old keybindings will stay in the help files, which I use a lot. For example, I don't work often with tables in Markdown, so after customization, I'll have to look in my config and not in the Markdown help file.

There are two arguments, that Vim is more ergonomic than Emacs:

  • Editing in Vim requires fewer keystrokes
  • You don't need to press Ctrl-Alt-something, which brings pain to your fingers

Let's look at a particular use case: I need to insert a bulleted list in HTML:

  1. In Emacs, you can do that with HTML mode, which is installed by default. In Vim, you can install snippets or Emmet.
  2. In Emacs, I press Ctrl with one hand and press C C with another hand, then release Ctrl and press U.

It's very important to press modifier keys with another hand to evade discomfort. And it requires some self-discipline, but it's worth it. But what I see here, is that I pressed Ctrl once: I pressed it, held it, and then released it. Instead, in Vim I need to enter command mode and exit command mode with two keystrokes. And in Emacs, I don't think about 'entering command mode' and 'exiting command mode' while I hold Ctrl. What's more ergonomic then?

Ok, let's talk about the modes I use every day.

Using Emacs' modes

I use three modes main modes (and text mode, of course): Markdown, Org, and HTML.

Regarding Markdown Emacs has a great mode written by Jason Blevins. Just install it, open the .md file in Emacs, and press Ctrl-H M. It's just great, it can do almost everything. And there are some more markdown modes available, notably for creating a table of contents. On the contrary, in Vim I tried to use vimwiki and snippets, but I wasn't able to get even some part of Markdown mode functions in Emacs. It's very sad, but it seems that Vim is more used by programmers who don't write a lot of Markdown.

Regarding Org-mode: this man, Carsten Dominik, who created it – I think he's a genius. The whole concept is fascinating and it works great when you have to structure a lot of information and update it frequently. To get something similar I needed to have a wiki and constantly switch between 'read' and 'write' modes. Again, the 'export' feature is one of my favorites. But Org-mode is implemented in Vim and Neovim only partially. Why's that? Maybe not enough people are interested in that. And maybe it's not so simple to implement all the Org-mode features in Neovim even considering it has Lua.

I suppose I need all the power of Org-mode and I prefer to use a more stable product if I have a choice. Org-mode was the main reason for me to switch to Emacs because I can do everything else just in any editor.

Current state of Neovim development vs. Emacs

Vim for a long time was considered a 'fast bare-metal editor', but look what's happening:

  • Vim got a file manager
  • Vim has Org-mode implementation(s)
  • Neovim now has Lua to make it more customizable

Doesn't it seem like Vim/Neovim is just repeating Emacs's path? But a lot of talented people already put their effort into developing great modes and extensions for Emacs, you can just use it. When they needed to edit Markdown or write an Org-mode there was no Neovim with Lua, so they did it for Emacs. And these modes are still very, very useful. Why should I suffer then with a lack of functions and instability? So, I don't.

Emacs extensions, are they really useful

I don't use lots of extensions for Emacs. I tried an email client and a Telegram client just for an experiment. But I use some Gmail features like 'undo send' and 'schedule send' that are hard to reproduce in an email client. So, are Emacs extensions an overkill? I think the RSS client and IRC client could be useful for me, just to use the same environment and the same keystrokes for editing.

And, by the way, I don't use dired or pdf viewer inside Emacs. But I'm happy all these extensions exist, so people do have a choice. It's also great to have Vim/Neovim as a choice, so when is it preferable for me?

Use cases where Vim is unbeatable

First, there's an interesting concept using Vim with Tmux, along with Tmux's sessions. If it's preferable for your workflow, Emacs won't help you: it sucks in a terminal and it assumes it's an external program to everything that runs inside it.

Second, if you have a terminal-only environment, like Git for Windows.

No holy wars, peace to everyone.

@Konstantin Ovchinnikov
Tags: #linux #productivity #vim #emacs