More on Emacs Keybindings in macOS

Emacs users on macOS are always discovering that the operating system supports many of the Emacs navigation keybindings and share their discovery with a Tweet or reddit post. Of course, it’s much better than that. You can install most of the Emacs editing keybindings into macOS. I first wrote about this 9 years ago and have periodically repeated the information as more and more folks discover the default Emacs bindings in macOS.

I thought that by now I and others had said everything worth saying about the matter but Álvaro Ramírez has something else interesting to add. It turns out the Ctrl+n and Ctrl+p don’t work correctly in macOS system completion lists. Ramírez has internalized the Ctrl+n and Ctrl+p bindings, especially since they work everywhere else, and was bothered by the failure on completion lists.

Ramírez found a solution from Atif Afzal. The TL;DR is that he uses Karabiner-Elements to map Ctrl+n and Ctrl+p to the down and up arrow keys. Take a look at Ramírez’s post for the details including the karabiner.json to make the mappings. He also includes a configuration to map Ctrl+g to Esc, which he finds to be useful as well.

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