I’ve been using Emacs with vim-style editing bindings for two months, and this morning I’ve decided to turn them off (which’ll take some time). The tipping point was last night, when I tried to connect to IRC briefly in order to respond to a MemoServ memo. I tried to fire up the Emacs IRC client rcirc, and immediately found myself in keybinding hell where I couldn’t even type my password for NickServ. This is because any Emacs mode which isn’t editing a text file needs special configuration to work with my vim keybindings; when I was a pure Emacs user, firing up such special modes immediately put me into an intuitive environment, even if some things always need to be tweaked. (The reason is vim’s modality.) This experience had me reconsider my priorities. Here’s why I think in my case, hacking vim into Emacs isn’t something I should keep in place.
There are a great many small advantages that come from using the vim editing bindings. But I was driven to use Evil (the best vim emulation layer for Emacs) by two key personal priorities. These priorities had me wanting to switch, waiting until I could come up with solutions to compatibility problems with elements of the Emacs environment that I wasn’t willing to give up, as described in the blog post I’ve already linked.
Firstly, I was starting to experience pain in my left little finger due to one-handed key-chording. That’s pressing things like C-w and C-xC-f with my left hand, which I was doing hundreds of times per hour of Emacs use. Since the only chording vim requires is with the shift-key, and I’ve already trained myself to press the shift-key with one hand and the key to be modified with the other, using vim bindings immediately slices down my abuse of my little finger.
What I’ve since realised is that I have bad computer usage habits which
abuse my whole body, and having to chord regularly is insignificant. I
care far too much about my UNIX environment: basically my Emacs
configuration, my shell configuration and the contents of ~/bin
. When
one of these doesn’t do something exactly as I want and I know that I’m
capable of making it as I want, I get totally obsessed with making it
work. I will readily spend three or four hours trying things and
googling all to eventually end up writing three or lines of elisp. This
can be a form of procrastination, but often it’s just the result of
having an interesting hobby. But it need not involve the physical abuse.
I tense up, lock my eyes to my monitor and don’t look away and just
manically type and click away. I should sit properly and take regular
breaks from keyboarding. Failing to do this means that I barely gain
anything from the vim keybindings since I’m abusing my hands and the
rest of my body regardless.
Secondly, there is the elegance and efficiency of vim compared to the ugliness of Emacs text editing keybindings. Using expressive, clean and quick text editing keybindings is a way of taking pride in my work, by using an elegant tool. And this taking pride in one’s work is a virtue. Vim has a quiet zen I missed in my two years of pure Emacs.
Unfortunately, it doesn’t have this quiet zen quite so much within Emacs, as I described in my first paragraph. Using vim as part of a computer workflow driven by the unix philosophy—making heavy use of piping into and out of external commands, which vim is good at—perhaps retains the quiet zen, but that is not how I use it and not how I ever will use it. I’m stuck on Windows all day at school.
So perhaps then I should be fighting to restore the elegance by hacking away on Emacs to make it all work together, if this elegance is to be prized. What I now think, though, is that elegance is something that we humans tend to only be able to get at in snatches. The sculptor makes an elegant statue using inelegant tools and his inelegant body. Our tools in particular (which is all Emacs is) should be thought about in their historical context. We are, of course, editing text written in deeply imperfect human languages which fail to meet a lot of our aesthetic standards. What we make with our tools can to some extent escape: our programs and essays can have a self-contained elegance and perfection that the tools and humans who wrote them don’t have.
So I’m switching back. Here are some guiding principals for making changes to my configuration in the future:
- Be careful about when trying to be like vim. Sometimes new bindings to edit text faster and move around are worthwhile when you find yourself doing something repetitive over and over with a long list of key presses, but mostly they’re not. Writing complex elisp to automate stuff is more useful and avoids future incompatibilities.
- Small incremental changes are more time-efficient than overhauls.
- Don’t add big complex new packages you don’t have a use case for. If a package addresses something you’ve found annoying, add it. Otherwise, resist the temptation to try it out.
- Emacs is not always the best tool for the job. Don’t try to put e.g. e-mail inside Emacs just because it’s Emacs.
- Try to keep the environment as portable as is practical but don’t get anxious about vim enthusiasts having their favourite editor absolutely everywhere. It’s a minor discomfort compared with the discomfort everyone gets for not having all one’s config files.
- Accept that the grass is always greener: vim will always do some things better than Emacs but it’s not worth trying to totally break out of Emacs’ historical context.
- Try to recognise when your reconfiguration is just procrastination. Take a moment to think about it.