Apple Text Navigation and Emacs

Charles Choi is grateful—really grateful—to Apple for a longstanding UI feature. As many, many others have discovered, macOS apps recognize some basic Emacs navigation commands. Choi tells us something that I didn’t know. Apparently the NextStep programmers added the feature because they used Emacs and wanted familiar keystrokes when using the NextStep UI. When Apple acquired NextStep or NextStep acquired Apple—depending on who you ask—those bindings got inherited by macOS.

As I periodically remind everyone, it’s actually much better. You can map any macOS navigation command to an arbitrary keystroke. The above links points to a very easy way to do that. It basically amounts to installing a file that contains those bindings (the file is provided at the link). But wait. There’s more. You can add your own bindings to the file. It’s easy; try it and see.

Lots of GNU utilities respect Emacs bindings, of course, but Apple enables many of the Emacs navigation commands in all apps running on its Desktop. As I’ve said before, it takes a lot of the sting out of having to leave Emacs.

To channel Steve Jobs: One more thing. If this isn’t enough for you, take a look at emacs-everywhere. I’ve written about it a couple of times recently. The TL;DR is that when you’re in an arbitrary text box in macOS or Linux you can pop up an Emacs frame that lets you write the text in Emacs and save it to the text box.

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