Mac OS X: Emacs-like keybindings everywherePublished on Oct 19, 2012

One of the reasons why I love working with OS X is the Emacs-like keybindings, which are available in the whole system. One of the most used ones for me are Ctrl-a and Ctrl-e for jumping to the start and the end of a line.

But sometimes you need more than that, for example forward deleting a word. In terminal that would be Ctrl-d, but that’s not available in the default OS X keymap.

But because OS X is awesome, you can easily customize this with the following

{
    "~d" = "deleteWordForward:";
}

and save it under

~/Library/KeyBindings/DefaultKeyBinding.dict`

The ~ here stands for the alt/option key.

You don’t even need to restart, it’ll start working for all newly started applications. Here’s an example of some more Emacs style keybindings you might be used to from using the terminal

{
    "~d" = "deleteWordForward:";
    "^w" = "deleteWordBackward:";
    "~f" = "moveWordForward:";
    "~b" = "moveWordBackward:";
}

These keybindings will work in all applications in the whole system. You can easily use them in your IM client, or when writing a longer document.

Written by Jakub Arnold of sensible.io.

Do you manage email campaigns for your business?

We're building a tool to help businesses reach out to their customers more easily. It's called SendingBee and it's going to be awesome.