49 lines
1.6 KiB
JavaScript
49 lines
1.6 KiB
JavaScript
// defaults: https://github.com/ttscoff/KeyBindings
|
|
// explained: https://ss64.com/osx/syntax-keybindings.html
|
|
// discussion: https://gist.github.com/trusktr/1e5e516df4e8032cbc3d
|
|
// Set a binding for repeating action (e.g.: ^u, 5, right arrow)
|
|
// > defaults write -g NSRepeatCountBinding -string "^u"
|
|
//
|
|
// Local list:
|
|
// /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict
|
|
//
|
|
//
|
|
//
|
|
// General methodology stays as with the rest of the configs
|
|
//
|
|
// startOfLine backWord backChar forwardChar forwardWord endOfLine
|
|
// Movements: ^a ^b ^j ^f w^ e^
|
|
// Selections: ^u ^h ^d k^
|
|
|
|
{
|
|
// Move by char. Overrides emacs defaults
|
|
"^f" = (moveForward:);
|
|
"^j" = (moveBackward:);
|
|
|
|
"^d" = (deleteForward:);
|
|
"^h" = (deleteBackward:);
|
|
|
|
// Move by word
|
|
"^w" = (moveWordForward:);
|
|
"^b" = (moveWordBackward:);
|
|
|
|
// Select by word
|
|
"^@w" = (moveWordForwardAndModifySelection:);
|
|
"^@b" = (moveWordBackwardAndModifySelection:);
|
|
|
|
// Delete to paragraph/line start/end
|
|
//"^u" = (moveToBeginningOfParagraphAndModifySelection:, delete:);
|
|
//"^k" = (moveToEndOfParagraphAndModifySelection:, delete:);
|
|
"^u" = (moveWordBackwardAndModifySelection:);
|
|
"^k" = (moveToEndOfParagraphAndModifySelection:);
|
|
|
|
// Select to paragraph/line start/end
|
|
"^@u" = (moveToBeginningOfParagraphAndModifySelection:);
|
|
"^@k" = (moveToEndOfParagraphAndModifySelection:);
|
|
|
|
// Uppercase word
|
|
"^y" = (uppercaseWord:, moveWordForward:, moveWordBackward:);
|
|
}
|
|
|
|
// ex: set ft=javascript:
|