Skip to content

Instantly share code, notes, and snippets.

@bdd
Last active December 5, 2021 20:37
Show Gist options
  • Save bdd/4721002 to your computer and use it in GitHub Desktop.
Save bdd/4721002 to your computer and use it in GitHub Desktop.
My Cocoa key bindings (in addition to defaults).
{
/* Additional Emacs bindings:
*
* "<key combination>" = "functionName:";
*
* Key Modifiers:
* ^: ctrl
* ~: option
* $: shift
* @: command
*
* Install to ~/Library/KeyBindings/DefaultKeyBinding.dict
*
* Functions:
* https://developer.apple.com/documentation/appkit/nsstandardkeybindingresponding
*/
"^l" = "centerSelectionInVisibleArea:";
"^/" = "undo:";
"^ " = "setMark:";
"~f" = "moveWordForward:";
"~b" = "moveWordBackward:";
"~<" = "moveToBeginningOfDocument:";
"~>" = "moveToEndOfDocument:";
"~v" = "pageUp:";
"~d" = "deleteWordForward:";
"^w" = "deleteWordBackward:";
"~/" = "complete:";
"~t" = "transposeWords:";
"^x" = {
"h" = "selectAll:";
"k" = "performClose:";
"^f" = "openDocument:";
"^x" = "swapWithMark:";
"^m" = "selectToMark:";
"^s" = "saveDocument:";
"^w" = "saveDocumentAs:";
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment