[
{"keys": ["ctrl+g"], "command": "sbp_quit", "args": {"favor_side": "start"},
"context": [
{"key": "sbp_catchall"},
// inverse of all the "escape" key things found in Default plugin and elsewhere
{ "key": "has_next_field", "operator": "equal", "operand": false },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "panel_visible", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
]
},
{"keys": ["ctrl+g"], "command": "clear_fields",
"context": [{ "key": "has_next_field", "operator": "equal", "operand": true }]
},
{"keys": ["ctrl+g"], "command": "clear_fields",
"context": [{ "key": "has_prev_field", "operator": "equal", "operand": true }]
},
{"keys": ["ctrl+g"], "command": "hide_panel", "args": {"cancel": true},
"context": [{ "key": "panel_visible", "operator": "equal", "operand": true }]
},
{"keys": ["ctrl+g"], "command": "hide_overlay",
"context": [{ "key": "overlay_visible", "operator": "equal", "operand": true }]
},
{"keys": ["ctrl+g"], "command": "hide_popup",
"context": [{ "key": "popup_visible", "operator": "equal", "operand": true }]
},
{"keys": ["ctrl+g"], "command": "hide_auto_complete",
"context": [{ "key": "auto_complete_visible", "operator": "equal", "operand": true }]
},
// prevent default ctrl+g goto line command from running
{"keys": ["ctrl+g"], "command": "cancel",
"context": [{"key": "overlay_visible", "operator": "equal", "operand": true }]
},
// cancel isearch
{ "keys": ["ctrl+g"], "command": "sbp_inc_search", "args": {"cmd": "quit"},
"context": [ {"key": "i_search_active"}, {"key": "panel_has_focus"} ]
},
{"keys": ["escape"], "command": "sbp_quit", "args": {"favor_side": "start"},
"context": [
{ "key": "sbp_catchall"},
// inverse of all the "escape" key things found in Default plugin and elsewhere
{ "key": "num_selections", "operator": "equal", "operand": 1 },
{ "key": "has_next_field", "operator": "equal", "operand": false },
{ "key": "has_prev_field", "operator": "equal", "operand": false },
{ "key": "panel_visible", "operator": "equal", "operand": false },
{ "key": "overlay_visible", "operator": "equal", "operand": false },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
]
},
{ "keys": ["ctrl+x","ctrl+s"], "command": "save" },
{ "keys": ["alt+w"], "command": "copy" },
{ "keys": ["ctrl+w"], "command": "cut" },
{ "keys": ["ctrl+y"], "command": "paste" },
{ "keys": ["ctrl+b"], "command": "move", "args": {"by": "characters", "forward": false} },
{ "keys": ["ctrl+f"], "command": "move", "args": {"by": "characters", "forward": true} },
{ "keys": ["ctrl+p"], "command": "move", "args": {"by": "lines", "forward": false} },
{ "keys": ["ctrl+n"], "command": "move", "args": {"by": "lines", "forward": true} },
{ "keys": ["shift+ctrl+b"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true} },
{ "keys": ["shift+ctrl+f"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true} },
{ "keys": ["shift+ctrl+p"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true} },
{ "keys": ["shift+ctrl+n"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true} },
{ "keys": ["shift+ctrl+a"], "command": "move_to", "args": {"to": "bol", "extend": true} },
{ "keys": ["shift+ctrl+e"], "command": "move_to", "args": {"to": "eol", "extend": true} },
{ "keys": ["ctrl+a"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "eol", "extend": false} },
{ "keys": ["ctrl+s"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
{ "keys": ["ctrl+s"], "command": "find_next", "context":
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["ctrl+r"], "command": "find_prev", "context":
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["ctrl+v"], "command": "move", "args": {"by": "pages", "forward": false} },
{ "keys": ["alt+v"], "command": "move", "args": {"by": "pages", "forward": true} },
{ "keys": ["ctrl+c","ctrl+q"], "command": "reindent", "context":
[
{ "key": "setting.auto_indent", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
{ "key": "following_text", "operator": "regex_match", "operand": "^$", "match_all": true }
]
},
{ "keys": ["ctrl+l"], "command": "show_at_center" },
{"keys": ["ctrl+d"], "command": "right_delete"},
{"keys": ["ctrl+/"], "command": "undo"},
{"keys": ["ctrl+shift+/"], "command": "redo"},
{ "keys": ["ctrl+c", "b"], "command": "build" },
]