My Emacs use has changed a fair bit in the past year and especially in the past 6 months. I feel like over time I have almost been ripping more stuff out of my config than adding new things. I started out using Emacs with a very full configuration (Doom Emacs) back in 2019, but eventually ended up creating my own configuration that took a lot of inspiration from how Doom did things. Lots of Evil mode, spacebar-based leader keys, largely the same completion frameworks etc.
But as I have played around with things and learned more, I have been kind of simplifying my config a lot. Part of it is probably just some pseudo-minimalist thinking or just playing around with new things for the sake of trying new things, but I think it has also been quite valuable and I like my config quite a bit. Not that the old config was bad, but I certainly feel like I am more aware of what my config is doing since I slimmed it down quite a bit.
So, this post is basically about some of the bigger things that I have decided to try out and which have stuck.
The titular god
So, this one is probably the biggest change and it happened 6 months ago. I have always used Emacs with Evil keybindings, since I come from Vim/Neovim background. I probably would have never even switched to Emacs in the first place if I hadn't been able to take my Vim keys with me on the journey, so I obviously don't think that Evil is bad.
However, sometimes my config would inevitably break in some way and fail to load Evil and
I would need to deploy some emergency Emacs keybindings to sort things out. I also felt
like Evil was abstracting a lot of things to a degree where I wasn't really sure how
things worked. My config accumulated like three ways of doing keybinds and I wasn't really
sure if I needed that or why. Some new packages I would try would also not (yet) have
ready-made Evil keymaps in the evil-collection, so I would sometimes drift between the Vim
world and the Emacs world or I would have to spend time setting up my own keybinds that
would kind of replicate what other similar modes were doing. Many docs I would read would
not really apply and I felt like I had pretty big gaps in my Emacs knowledge because I was
still kind of treating it as Vim.
So, one boring work day I decided I would finally bite the bullet, learn the Emacs
keybindings and see how I could do without Evil. However, I do not necessarily like
holding modifiers down for extended periods, so I did make one concession towards modal
editing: the venerable god-mode.
This was initially a pretty rough experience and I kept messing things up, suddenly
deleting half of my buffer contents or jumping to random places, but I kept at it and with
the help of re-reading Mastering Emacs and actually doing the Emacs tutorial, I started to
notice that although Emacs keybindings are certainly alien, there is a logic to them.
Similar to how Vim has a language for text editing, vanilla Emacs does too. It groups
things in somewhat predictable ways and remains pretty consistent across different modes,
even ones that come from the community. I was also able to chuck away a bunch of the
keybinding code I had in my config and unified all my custom keybinds under use-package,
which I finally learned to actually use somewhat properly. And god-mode helped me access
these keybinds in a more modal kind of way and gave me a similar kind of feeling of
efficiency that I got from making snappy edits with Vim.
Of course, Emacs keybinds do have slightly different theory regarding operating on text.
Vim has a bunch of features that allow you to quickly do a number of actions on different
kinds of text objects. Emacs has some of these, like kill-* words for sentences, lines
and words, but in a lot of ways the Emacs way of doing thins is more built around movement
and selections. I initially particularly struggled with deleting or changing things inside
parentheses, but what I eventually got to work for me was expand-region, which I later
switched for expreg. These are really neat in that they allow me to just move into the
area I want to operate on and then I can with a quick key press expand or contract my
selection to match the thing I was operating on. surround was also a good find, allowing
me to wrap things into matched markers (parentheses, quotes, double quotes, etc.), which
was a feature I was lacking.
These days I have learned some of the S-expression keys, which do a lot of the text object
things that Vim is capable of. These can technically also hook into treesitter, so
technically they could operate on all the relevant text objects based on the language
context, but I haven't yet played with that too much. Combobulate might also be interesting
to test here, but I am still waiting for it to get packaged before jumping on it.
I have also noticed that I end up toggling on god-mode less and less. I already have ctrl
bound to caps lock and have for a while, so I can reach it pretty conveniently. However,
for very intensive and repeated editing, I will still hop into god-mode.
Side note: I also installed devil-mode, which is very similar to god-mode. I mainly
used it on my Android phone in Termux, but I might have switched to it fully if it wasn't
for the simple fact that devil-mode doesn't do which-key support. I just like being
able to see what options are available after I have pressed a prefix key.
Tempel of snippets
I love a good snippet collection and I think that a bunch of the LLM craze related to "dealing with boilerplate" could be solved by simply learning of the existence of snippets. Alas, those people are probably too far gone to ever learn a new thing.
But since I hold you, the dear reader, in higher regard than your average vibecoder, I will tell you: snippets are really great actually. They allow you to quickly insert repetitive structures both correctly and cheaply and basically every programmer's editor under the sun has some ways of doing it.
In the past I used yasnippet for this, but on a lark one day I decided to switch out out
for tempel. Mostly for no reason other than curiosity. However, I think tempel is here
to stay for the simple reason that with yasnippet I fell into the same kind of trap I
did with Evil: I didn't really ever learn how to use it. I was able to create basic
snippets with it, but I still felt hesitant to really make snippets of my own, so I
largely relied on the yasnippet-snippets collection. Tempel has a collection too, and I
have it installed, but it doesn't really cover that many things and I even dislike some of
its naming schemes. So, I had a good incentive to actually learn how to write my own
snippets. I won't claim I am an expert, but I can work my way around the basic stuff I
really need. Tempel also benefits from being quite simple, so even though the snippeting
looks pretty damn alien and initially indecipherable, there are only a handful of things
that one needs to learn to use it. And that lower barrier to writing snippets means I end
up writing more of them and therefore using more of them. I even have tempel-expand
in my completion-at-point-functions, so I can just write the name of a snippet and hit
tab to expand it out. It's pretty damn great.
To completion
Finally, completion frameworks.
Even while I was still in Doom Emacs, I swapped out of lsp-mode to eglot for my LSP
functionality. I don't remember why exactly, except maybe just that silly minimalism, but
it stuck and I am still on eglot now. It's part of base Emacs these days, which is quite
nice.
I have also gone through replacements to both the completion frontend and the backend
frameworks over time as well. I think Doom Emacs was using ivy-mode as its frontend until
eventually moving to vertico. When I rolled my own config, I kept using vertico until
one day I decided I would for the first time actually see what Emacs ships with. From there
I found fido-vertical-mode which runs on top of icomplete and just kind of stuck to it.
Once again, vertico is great, but I didn't really feel like I needed much from it even
after adding the orderless + marginalia combo on top.
On the backend, I started with company-mode and then eventually moved to corfu, but
once again decided to try what the vanilla option was when completion-preview-mode
shipped as part of base Emacs. So, these days I actually just use that plus the basic
*Completions* buffer. It's worked quite well for me and although it's not fancy, it
pretty much does what I need it to do. So, it's what I have been using and I don't think
I miss much.
Conclusions
So yeah, that is a bit of a summary of some of the turns and changes I have encountered on my Emacs journey. I think through all of these I have learned a lot and I am now much more comfortable with Emacs as a whole.
Of course, I am not claiming this is the one true way of using Emacs. It's a fully hackable system and therefore it really is what you make of it. Using things like Doom Emacs or Evil are not noobish training wheels if you don't let them, so if you are comfortable then embrace that comfort.
However, I have quite enjoyed going out of that comfort zone and I think there has been some pretty amazing insight to learn from doing that. So if you get that inkling to want to dive a bit deeper into your tools, I say you should embrace it and see where the rabbit hole goes. It could end up being just an exercise in wasting time, but sometimes you might find something new and exciting. And sometimes it's good to just have some fun with things.