Repository navigation
Expand file tree
/
Copy pathDefault.sublime-keymap
More file actions
50 lines (49 loc) · 2.51 KB
/
Copy pathDefault.sublime-keymap
File metadata and controls
50 lines (49 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
[
{"keys": ["ctrl+s"], "command": "save_all", "args": {"async": true}},
{"keys": ["ctrl+alt+s"], "command": "ai_capture_scroll_position"},
{"keys": ["ctrl+alt+l"], "command": "ccstatusline_editor_open"},
// Escape goes to whatever has focus. The default keymap hides any visible
// panel (e.g. the build output) on Escape even while a view has focus, and
// that beats clearing extra cursors. The rules below (a later rule wins):
// 1. view focused, panel visible: Escape must not close the panel
// (`cancel` is the default "do nothing" command);
// 2. same in a terminal tab: the terminal gets its Escape;
// 3. view focused with several cursors: clear them, even with a panel.
// A focused panel, popups, auto-complete, the overlay and snippet fields
// still get Escape as before (those contexts are excluded).
{
"keys": ["escape"], "command": "cancel",
"context": [
{"key": "panel_visible", "operator": "equal", "operand": true},
{"key": "panel_has_focus", "operator": "equal", "operand": false},
{"key": "setting.ai_terminal_view", "operator": "not_equal", "operand": true},
{"key": "setting.command_mode", "operator": "not_equal", "operand": true},
{"key": "overlay_visible", "operator": "equal", "operand": false},
{"key": "auto_complete_visible", "operator": "equal", "operand": false},
{"key": "popup_visible", "operator": "equal", "operand": false},
{"key": "has_next_field", "operator": "equal", "operand": false},
{"key": "has_prev_field", "operator": "equal", "operand": false}
]
},
{
"keys": ["escape"], "command": "ai_terminal_keypress", "args": {"key": "escape"},
"context": [
{"key": "setting.ai_terminal_view", "operator": "equal", "operand": true},
{"key": "panel_visible", "operator": "equal", "operand": true},
{"key": "panel_has_focus", "operator": "equal", "operand": false},
{"key": "overlay_visible", "operator": "equal", "operand": false}
]
},
{
"keys": ["escape"], "command": "single_selection",
"context": [
{"key": "num_selections", "operator": "not_equal", "operand": 1},
{"key": "panel_has_focus", "operator": "equal", "operand": false},
{"key": "overlay_visible", "operator": "equal", "operand": false},
{"key": "auto_complete_visible", "operator": "equal", "operand": false},
{"key": "popup_visible", "operator": "equal", "operand": false},
{"key": "has_next_field", "operator": "equal", "operand": false},
{"key": "has_prev_field", "operator": "equal", "operand": false}
]
}
]