Skip to content

Instantly share code, notes, and snippets.

@anildigital
Forked from anonymous/DefaultKeyBinding.dict
Last active May 19, 2017 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anildigital/b391b4ab95f2855382aa6a25a20a30c1 to your computer and use it in GitHub Desktop.
Save anildigital/b391b4ab95f2855382aa6a25a20a30c1 to your computer and use it in GitHub Desktop.
Create this file ~/Library/KeyBindings/DefaultKeyBinding.dict
{
"\UF729" = moveToBeginningOfParagraph:; // home
"\UF72B" = moveToEndOfParagraph:; // end
"$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home
"$\UF72B" = moveToEndOfParagraphAndModifySelection:; // shift-end
// Emacs keybindings
"^ " = "setMark:";
"~d" = "deleteWordForward:";
"~w" = "copy:"; /* M-w */
"^w" = "deleteWordBackward:";
"^_" = "undo:";
"^?" = "redo:"; /* C-? */
"~f" = "moveWordForward:";
"~b" = "moveWordBackward:";
"~@" = "selectWord:";
"~v" = "pageUp:";
"^g" = "_cancelKey:"; /* C-g */
"^y" = "paste:"; /* C-y */
"^t" = "transpose:"; /* C-t */
"~t" = "transposeWords:"; /* M-t */
"~<" = "moveToBeginningOfDocument:"; /* M-< */
"~>" = "moveToEndOfDocument:"; /* M-> */
"^V" = "pageDownAndModifySelection:";
"~B" = "moveWordBackwardAndModifySelection:";
"~F" = "moveWordForwardAndModifySelection:";
"~/" = "complete:"; /* M-/ */
}
@anildigital
Copy link
Author

Also in iTerm 2, do below steps

Go to Preferences -> Profiles -> Keys

Set Left option key act as:

+Esc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment