Goodbye Emacs...


I am leaving Emacs and am returning to Vim.

I switched to Emacs a few weeks ago, because, unlike Vim, it is a graphical editor and makes full use of this. Emacs can display multiple fonts at the same time (even in different sizes), display pictures, graphics, LaTeX formulas, plot, PDFs and more. Also ELisp is a considerably better extension language then VimScript. Configuring Vim often feels pretty hacky, while configuring Emacs is comfortable and fluid.

But it is simply not worth it to live with all the annoyance, even for all this nice stuff.

What I immediately noticed was how bad indentation is in Emacs. It is often said that you can transform Emacs into whatever you like. But when it comes to indentation, the developers apparently really want to force the users to use spaces. I wrote about this before and presented a solution I found. Well, that solution is not only hacky, but also simply does not work in a lot of modes. I could edit C code with tabs, but not PHP code or Bash code. In the long run, I most likely would have had to write my own indentation functions or even modes for all languages I want to edit, just to use tabs. That is insane! In Vim, I only need about two to five lines in my vimrc for that. Vims indentation is a little more dumb, but at least it respects me wanting to use tabs.

I also missed Vims tabs. Emacs simply does not have anything like that by default and all plugins I tried feel hacky. I settled on using Sway in tabbed mode and simply opening new Emacs frames (What Emacs call its windows).

Even with a minimal configuration, Emacs starts up slowly. To work around this, you have to start it as a daemon on login and use clients to connect to the daemon server. In other words, all editing you do in a login session is done in the same Emacs instance. Luckily, ELisp basically never causes Emacs to crash, but I still think this is wonky.

A minor difference that is incredibly annoying: Emacs buffers created by the user always correspond to a file. In Vim I can simply open as many buffers as I want without creating files. This is really handy for temporary notes or for quickly storing some code. In Emacs you only have the scratch buffer for that.

And Emacs comes with a lot of unneeded and redundant stuff. At least one mail client, an RSS feed reader, a newsgroup reader (that can also be used as a mail client), a man page reader, a info page reader, a Tetris clone, multiple emulation modes (one for Vi, one for "standard" editors, ...), integration for all common version control tools, a calendar, a scientific calculator, two terminal emulators and a lot more. That might have been nice in the old days, when you did not have graphics or even a terminal multiplexer, so you could launch a single applications and that's it. But instead of integrating everything into my text editor, I prefer to integrate my text editor into dedicated programs. You can kinda get over that by recognizing that Emacs is not really a text editor but more a graphical shell running ELisp programs (kinda like a virtual Lisp Machine), but even then, Emacs is not really a good graphical shell; I definitely prefer prefer a terminal, even if it can not display images. And I definitely prefer the tools I use in a terminal over those that comes with Emacs. I will never use most of the things bundled with Emacs and I have found no way to remove them, triggering my imaginary OCD. Vim has a bunch of useless stuff as well, but considerably less then Emacs.

I have read an article about the way Emacs was tricked into displaying stuff on an X window. That almost gave me nightmares! Emacs apparently always thinks it draws to a terminal, while in reality some thing just emulates a terminal. Another thing emulates something for the first thing and a third thing emulates something for the second thing. Emulation all the way down! This means Emacs sucks at multitasking, so when you start some operation in one frame, all other frames lock up and become unusable until the operation finishes, since all frames belong to the same Emacs instance.

Sadly, ELisp being such a good extension language caused the developers to implement way to many of Emacs core functionality in it, instead of in C. This leads to Emacs simply not being as fast as Vim. This is especially obvious using Evil, the Vim emulation layer, which I had to use as Emacs default keybindings are terrible.

So I am moving back to Vim. I will miss a few things from Emacs, mostly all the graphics stuff, like multiple fonts and LaTeX preview, but also the nice modeline, ELisp, evil-goggles, aggressive-indent-mode and also a little bit of Org. But overall Vim is simply better suited for my purposes.