How do I configure the Emacs-like keyboard shortcuts in OS X?

OS X has built in support for many Emacs-like keyboard shortcuts: for example, Control-A moves the cursor to the beginning of the paragraph and Control-E moves the cursor to the end. How can I configure these shortcuts and add more of them?


Solution 1:

Here are some good resources on how to add and configure these keyboard shortcuts:

  • A detailed exploration of these shortcuts by Llew Mason, unfortunately only available now through the Wayback Machine.

  • A similar article by an anonymous author (I think) that includes some caveats about specific methods.

  • A GitHub repository by Brett Terpstra that shows examples of some relatively complex key bindings.

  • A deep dive into the Cocoa Text System by Jacob Rus. It’s a decade old now but I’m guessing that a lot of the information is still applicable to today’s macOS.