Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Custom Sublime Text keybindings for rapid code navigation. No arrow keys required!
[
/* Navigate quickly through a file - Move by horizontally words and vertically by blocks */
{ "keys": ["ctrl+l"], "command": "move", "args": {"by": "subwords", "forward": true}},
{ "keys": ["ctrl+j"], "command": "move", "args": {"by": "subwords", "forward": false}},
{ "keys": ["ctrl+option+k"], "command": "move", "args": {"by": "stops", "forward": true, "empty_line": true}},
{ "keys": ["ctrl+option+i"], "command": "move", "args": {"by": "stops", "forward": false, "empty_line": true}},
/* Fine-grained navigation - Move horizontally by characters and vertically by lines */
{ "keys": ["ctrl+option+l"], "command": "move", "args": {"by": "characters", "forward": true}},
{ "keys": ["ctrl+option+j"], "command": "move", "args": {"by": "characters", "forward": false}},
{ "keys": ["ctrl+k"], "command": "move", "args": {"by": "lines", "forward": true, "empty_line": true}},
{ "keys": ["ctrl+i"], "command": "move", "args": {"by": "lines", "forward": false, "empty_line": true}},
/* Same as above but with shift to select the regions*/
{ "keys": ["ctrl+shift+l"], "command": "move", "args": {"by": "subwords", "forward": true, "extend": true}},
{ "keys": ["ctrl+shift+j"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true}},
{ "keys": ["ctrl+shift+k"], "command": "move", "args": {"by": "stops", "forward": true, "empty_line": true, "extend": true}},
{ "keys": ["ctrl+shift+i"], "command": "move", "args": {"by": "stops", "forward": false, "empty_line": true, "extend": true}},
{ "keys": ["ctrl+option+shift+l"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true}},
{ "keys": ["ctrl+option+shift+j"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true}},
{ "keys": ["ctrl+option+shift+k"], "command": "move", "args": {"by": "lines", "forward": true, "empty_line": true, "extend": true}},
{ "keys": ["ctrl+option+shift+i"], "command": "move", "args": {"by": "lines", "forward": false, "empty_line": true, "extend": true}},
/* Insert a new line - A closer enter key */
{ "keys": ["ctrl+;"], "command": "insert_snippet", "args": {"contents": "\n"}},
/* Delete the thing - A closer delete key */
{ "keys": ["ctrl+p"], "command": "right_delete"},
/* Switch panes */
{ "keys": ["ctrl+["], "command": "focus_neighboring_group", "args": {"forward": false}},
{ "keys": ["ctrl+]"], "command": "focus_neighboring_group", "args": {"forward": true}},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment