Files
personal-site/content/blog/2026-05-12-deploying-evil-hl-line-and-highly-visual-indicators.org
T

28 lines
2.3 KiB
Org Mode

#+TITLE: Deploying evil-hl-line and highly visual indicators
#+DATE: 2026-05-12
* TLDR
I created my first public Emacs package called =evil-hl-line= and it can be found on [[https://github.com/anerisgreat/evil-hl-line/][GitHub]]!
* Why even make a package
I am an addicted evil-mode user. I mainlined vim (well, neovim) and tmux for a year before switching to Emacs, so by the time I became enlightened I was set on using vim-style keybindings, and so I found myself to be an evil man.
A problem I faced early on in my vim journey was mode confusion. You must always know which mode you are in, as this affects the keybindings you use. This makes perfect sense, but sometimes, you just forget. Especially if you have multiple windows open, and in each one, the mode might be different.
I know this was a nuisance because of the amount of times I started pressing keys assuming I was in one mode but I found myself to be in another. Any vim/evil user has experienced this often at some point.
Of course there is an already existing visual indicator for the mode - in Emacs, using evil mode introduces a little text inside the modeline that says what the current mode is (In vim such a thing exists too, of course). Yet I still found myself pressing wrongly-moded keys quite often.
* A fix - highly visual indicators
Just because something is visible doesn't mean it is seen. I don't think this is a controvertial take by any means - but it often isn't taken into account when designing user interfaces.
When using vim+tmux, one of the biggest problems was knowing which window I was in. I would start typing in one shell or window and realized that I completely trashed another window. My solution was to make the active buffer background brighter, so ithat at a glance it would be obvious which window was selected. Once moving to Emacs I had to settle for only changing the color of the modeline, along with using hl-line-mode. Either way - it worked. I was far less confused as to which window was receiving my inputs because of this journey.
Knowing this, it seemed only natural to fix the mode confusion with a very obvious indicator as to which mode I am in. I have been using some version of =evil-hl-line= for quite a while, and am very pleased with the results. I hope you will be pleased too!