Last active
August 29, 2015 14:25
-
-
Save haveanicedavid/05a8010339e8da452dcc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
// Pane Navigation | |
// command + jkhl moves cursor in insert mode | |
{ "keys": ["ctrl+h"], "command": "move", "args": {"by": "characters", "forward": false} }, | |
{ "keys": ["ctrl+l"], "command": "move", "args": {"by": "characters", "forward": true} }, | |
{ "keys": ["ctrl+b"], "command": "move", "args": {"by": "words", "forward": false} }, | |
{ "keys": ["ctrl+w"], "command": "move", "args": {"by": "words", "forward": true} }, | |
{ "keys": ["ctrl+j"], "command": "move", "args": {"by": "lines", "forward": true} }, | |
{ "keys": ["ctrl+k"], "command": "move", "args": {"by": "lines", "forward": false} }, | |
// Origami (split pane ) Movement | |
// (Require Origami Plugin) | |
// travel to pane | |
{ "keys": ["ctrl+w", "l"], "command": "travel_to_pane", "args": {"direction": "right"} }, | |
{ "keys": ["ctrl+w", "h"], "command": "travel_to_pane", "args": {"direction": "left"} }, | |
// Create a new pane with current file | |
{ "keys": ["super+k", "k"], "command": "create_pane_with_file", "args": {"direction": "up"} } , | |
{ "keys": ["super+k", "l"], "command": "create_pane_with_file", "args": {"direction": "right"} }, | |
{ "keys": ["super+k", "j"], "command": "create_pane_with_file", "args": {"direction": "down"} }, | |
{ "keys": ["super+k", "h"], "command": "create_pane_with_file", "args": {"direction": "left"} }, | |
// Carry current file to pane | |
// { "keys": ["ctrl+w", "k"], "command": "carry_file_to_pane", "args": {"direction": "up"} }, | |
// { "keys": ["ctrl+w", "l"], "command": "carry_file_to_pane", "args": {"direction": "right"} }, | |
// { "keys": ["ctrl+w", "j"], "command": "carry_file_to_pane", "args": {"direction": "down"} }, | |
// { "keys": ["ctrl+w", "h"], "command": "carry_file_to_pane", "args": {"direction": "left"} }, | |
// Kill the current pane | |
{ "keys": ["ctrl+p"], "command": "destroy_pane", "args": {"direction": "self"} }, | |
// zoom / unzoom current pane | |
{ "keys": ["ctrl+super+o"], "command": "zoom_pane", "args": {"fraction": 0.9} }, | |
{ "keys": ["ctrl+super+i"], "command": "unzoom_pane", "args": {} }, | |
// Focus and zoom on a pane using control + command + h j k l (Vim Movements) | |
// ** Requires Chain of Command and Orgami Plugins | |
{ "keys": ["ctrl+super+h"], "command": "chain", | |
"args": { | |
"commands": [ | |
[ "travel_to_pane", {"direction": "left"} ], | |
[ "zoom_pane" ] | |
] | |
} | |
}, | |
{ "keys": ["ctrl+super+l"], "command": "chain", | |
"args": { | |
"commands": [ | |
[ "travel_to_pane", {"direction": "right"} ], | |
[ "zoom_pane" ] | |
] | |
} | |
}, | |
{ "keys": ["ctrl+super+j"], "command": "chain", | |
"args": { | |
"commands": [ | |
[ "travel_to_pane", {"direction": "down"} ], | |
[ "zoom_pane" ] | |
] | |
} | |
}, | |
{ "keys": ["ctrl+super+k"], "command": "chain", | |
"args": { | |
"commands": [ | |
[ "travel_to_pane", {"direction": "up"} ], | |
[ "zoom_pane" ] | |
] | |
} | |
}, | |
// Tab Navigation usign control + < and > | |
{ "keys": ["ctrl+,"], "command": "prev_view" }, | |
{ "keys": ["ctrl+."], "command": "next_view" }, | |
// Toggle Side-Bar / File Tree | |
// ** Requires Chain of Command and Focus File on Sidebar plugins | |
{ "keys": ["ctrl+n"], "command": "chain", | |
"args": { | |
"commands": [ | |
[ "toggle_side_bar" ], | |
[ "focus_side_bar" ] | |
] | |
} | |
}, | |
{ "keys": ["ctrl+\\"], "command": "focus_file_on_sidebar"}, | |
// Use Vim movement keys while navigating sidebar | |
{ "keys": ["h"], "command": "move", "args": {"by": "characters", "forward": false}, "context": | |
[ {"key": "control", "operand": "sidebar_tree"} ] }, | |
{ "keys": ["j"], "command": "move", "args": {"by": "lines", "forward": true}, "context": | |
[ {"key": "control", "operand": "sidebar_tree"} ] }, | |
{ "keys": ["k"], "command": "move", "args": {"by": "lines", "forward": false}, "context": | |
[ {"key": "control", "operand": "sidebar_tree"} ] }, | |
{ "keys": ["l"], "command": "move", "args": {"by": "characters", "forward": true}, "context": | |
[ {"key": "control", "operand": "sidebar_tree"} ] }, | |
// Control + 0 or Command + 0 focus on the file tree | |
{ "keys": ["super+0"], "command": "focus_side_bar" }, | |
// Auto Alignment on equal signs (super + \ also works) | |
{ "keys": ["ctrl+command+a"], "command": "valign" }, | |
// Tab Complete for snippits | |
{ "keys": ["shift+enter"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} }, | |
{ "keys": ["shift+enter"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false}, | |
"context": | |
[ | |
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }, | |
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*[^0-9]$", "match_all": true }, | |
] | |
}, | |
{ "keys": ["tab"], "command": "replace_completion_with_next_completion", "context": | |
[ | |
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" }, | |
{ "key": "setting.tab_completion", "operator": "equal", "operand": true } | |
] | |
}, | |
// Shift + enter goes to next field in snippits | |
{ "keys": ["shift+enter"], "command": "next_field", "context": | |
[ | |
{ "key": "has_next_field", "operator": "equal", "operand": true } | |
] | |
}, | |
// Bindings for Easy motion Plugin | |
{ | |
"keys": ["ctrl+space", "<character>"], | |
"command": "easy_motion", | |
"args": {"select_text": false} | |
}, | |
{ | |
"keys": ["super+;", "enter"], | |
"command": "easy_motion", | |
"args": {"select_text": false, "character": "enter"} | |
}, | |
{ | |
"keys": ["ctrl+super+;", "<character>"], | |
"command": "easy_motion", | |
"args": {"select_text": true} | |
}, | |
{ | |
"keys": ["super+shift+;", "enter"], | |
"command": "easy_motion", | |
"args": {"select_text": true, "character": "enter"} | |
}, | |
// Go to Definition (the second requires SublimeCodeIntel) | |
{ "keys": ["ctrl+t", "ctrl+t"], "command": "goto_definition" }, | |
{ "keys": ["ctrl+t", "ctrl+r"], "command": "goto_python_definition"}, | |
// Advanced New File: Command + alt + m to create a new file | |
{ "keys": ["super+alt+m"], "command": "advanced_new_file_new"}, | |
{ "keys": ["shift+super+alt+m"], "command": "advanced_new_file_new", "args": {"is_python": true}}, | |
{ | |
"keys": ["tab"], | |
"command": "insert", | |
"args": {"characters": "\t"}, | |
"context": [{ | |
"key": "setting.anf_panel" | |
}] | |
}, | |
] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment