Emacs config

Speedrun #

I like emacs and use it for as many things as I can, which is anything that doesn’t require email or media more complex than text.

If you only care about my init.el file, here you go. It has mostly quality of life improvements with consult/vertico/cape and themes. I find LSPs useful but cumbersome and prone to breaking, so I use dumb-jump a lot.

The long version #

Emacs isn’t a text editor #

The joke is as old as emacs: it’s great software, if only it had a good text editor. For my use-cases so far, emacs is an easily hackable, programming-first, keyboard-first, desktop replacement. I can drop in my init.el file and get started on a new machine right away. I keep the personalised keybindings to a minimum to make sure I can also use any version of emacs. Instead I focus on lightly customising other aspects like search and a variety of modes.

After reading this article, I finally understand why emacs is so good: it’s a virtual machine, and so it allows you to run whatever you want wherever there is a C compiler. Moreover, it somewhat goes counter the UNIX philosophy. Usually, you want each tool to do one thing, and one thing only. But here, emacs does many, many, many things. And this is its strength: wherever text manipulation makes sense, emacs has your back. Instead in regular UNIX-land, I need to learn every single tool’s keybindings. Not only that, but any tool that survives long enough sees its user manual balloon. It’s hard doing just one thing! Looking at VSCode and its json-based settings, or Neovim with Lua, they are recreating virtual machines little by little! The trick is to do it at the start, but you might end up with a slightly worse text editor…

What I need emacs for #

In general, I would describe my workflow as basic: generic coding tasks, like writing source code, editing config files, whether they be .csv, .lua, .yaml, or .toml. Sometimes I’ll use eww, emacs’ web browser to check documentation without switching environments. I also use it to write this website!

Why I like emacs #

I like emacs for several reasons:

Why emacs over vi/vim/neovim? #

One of my family members has been a professional software engineer and overall computer nerd for several decades more than me. I was telling them about my first software engineering job and complaining that my editor of choice, Atom, was being sunsetted. They laughed and said if I wanted to be taken seriously I should use a real text editor. I asked about vim and emacs and they said “emacs obviously.” So there you have it, this is how new emacs converts are created: family pressure. Several years later I was showing them my emacs config and they tried using vim keybindings. They again laughed and said if I wanted to be taken seriously I should use vim.

How I learned emacs #

After that family member recommend I learn to use emacs, I asked how to learn since it looked daunting. They said that you really needed to have someone to show you the ropes. Undeterred, and without much help, I started with the built-in tutorial, watched videos on youtube (special mention to System Crafters, read a book Mastering Emacs, and struggled my way there. The way I approached it was to learn the movement keys first (C-n, C-p, C-f, C-b), and then progressively add commands. If I found myself using M-x to search for a command often, I would add a keybinding for it. After the first few months, I didn’t need to use the mouse anymore, but I still learn new keybindings almost every week.

Some of my favorite features #

In no particular order, some of my favorite things:

Things I want to learn about more in emacs #