Line Numbers in Emacs 26.1

As you’ve probably heard, Emacs 26.1 has replaced the old linum-mode with a faster and less cluttered implementation. I almost never need or want line numbers so they’re normally turned off but for the occasional times when they’re useful, I have a custom key sequence to turn on linum-mode on a buffer basis. I replaced that call to the new facility by calling display-line-numbers-mode instead. They look a lot nicer and don’t slow things down as much for large files but I still don’t use them much.

Others disagree. I just watched a Xah Lee video on Abrev mode (I’ll be writing about that later) and noticed he had them turned on globally, presumably with global-display-line-numbers-mode. David Crook also likes to turn them on globally but he didn’t want them to display in his neotree buffer. He’s posted what he had to do to stop them from cluttering up his neotree buffer. It was harder than you might think so if you have the same or similar problem, you should take a look at his post to see how to fix things.

If you’re one of the people who likes line numbers in your buffers, you’ll appreciate how much the facility has been improved. Just another example of how vibrant our developer community is and how far from moribund Emacs is, no matter what the naysayers tell you.

This entry was posted in General and tagged . Bookmark the permalink.