-
Notifications
You must be signed in to change notification settings - Fork 9
/
keybindings.json
198 lines (169 loc) · 10.4 KB
/
keybindings.json
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
[
// Commands
{ "key": "alt+x", "command": "workbench.action.showCommands" },
{ "key": "ctrl+u", "command": "rust-analyzer.run",
"when": "editorLangId == rust" },
{ "key": "ctrl+u", "command": "runCommands",
"args": { "commands": [
{ "command": "workbench.action.tasks.terminate", "args": "terminateAll" },
"workbench.action.tasks.build"
] },
"when": "editorLangId != rust" },
{ "key": "Enter", "command": "rust-analyzer.onEnter",
"when": "editorTextFocus && !suggestWidgetVisible && editorLangId == rust" },
{ "key": "ctrl+j", "command": "editor.action.joinLines",
"when": "editorLangId != 'rust'" },
{ "key": "ctrl+j", "command": "rust-analyzer.joinLines",
"when": "editorLangId == 'rust'" },
{ "key": "ctrl+enter", "command": "explorer.newFile",
"when": "filesExplorerFocus" },
{ "key": "ctrl+shift+enter", "command": "explorer.newFolder",
"when": "filesExplorerFocus" },
{ "key": "ctrl+shift+F", "command": "search.action.openNewEditor" },
{ "key": "win+-", "command": "workbench.action.increaseViewSize" },
{ "key": "win+=", "command": "workbench.action.decreaseViewSize" },
{ "key": "ctrl+.", "command": "findJump.activate" },
{ "key": "ctrl+shift+.", "command": "findJump.activateWithSelection" },
// Window management
{ "key": "win+k", "command": "workbench.action.closeGroup",
"when": "editorFocus && multipleEditorGroups" },
{ "key": "win+k", "command": "workbench.action.closeActiveEditor",
"when": "inSearchEditor && multipleEditorGroups" },
{ "key": "win+k", "command": "workbench.action.toggleSidebarVisibility",
"when": "sideBarFocus" },
{ "key": "win+k", "command": "workbench.action.closePanel",
"when": "panelFocus" },
{ "key": "win+k", "command": "workbench.action.closeActiveEditor",
"when": "!sideBarFocus && !panelFocus && !multipleEditorGroups" },
{ "key": "win+f", "command": "runCommands",
"args": { "commands": [
"workbench.action.closePanel",
"workbench.action.closeEditorsInOtherGroups",
"workbench.action.closeOtherEditors",
"workbench.action.closeSidebar" ] },
"when": "editorFocus" },
{ "key": "win+e", "command": "workbench.action.splitEditorRight" },
{ "key": "win+o", "command": "workbench.action.splitEditorDown" },
{ "key": "win+n", "command": "workbench.action.focusNextGroup" },
{ "key": "q", "command": "workbench.action.toggleSidebarVisibility",
"when": "sideBarFocus" },
{ "key": "ctrl+o", "command": "workbench.action.quickOpen" },
// Devil
// g -- go definition, type, line, implementation
// e -- edit format, Uppercase _, sort, join
// n -- next error git change conflict
// o -- open file, explorer, ...
// m -- misc, hover, argument hits ...
{ "key": ", a", "command": "editor.action.quickFix" },
{ "key": ", l", "command": "workbench.action.gotoSymbol" },
{ "key": ", shift+l", "command": "workbench.action.showAllSymbols" },
{ "key": ", .", "command": "editor.action.revealDefinition" },
{ "key": ", shift+.", "command": "editor.action.revealDefinitionAside" },
{ "key": ", shift+/", "command": "whichkey.show" },
{ "key": ", p", "command": "editor.action.formatDocument" },
{ "key": ", w", "command": "rewrap.rewrapComment" },
{ "key": ", b", "command": "editor.action.jumpToBracket" },
{ "key": ", f", "command": "editor.fold" },
{ "key": ", shift+f", "command": "editor.unfold" },
{ "key": ", d", "command": "editor.action.dirtydiff.next" },
{ "key": ", g", "command": "runCommands",
"when": "editorTextFocus",
"args": { "commands": ["whichkey.show", { "command": "whichkey.triggerKey", "args": "g" }] } },
{ "key": ", e", "command": "runCommands",
"when": "editorTextFocus",
"args": { "commands": ["whichkey.show", { "command": "whichkey.triggerKey", "args": "e" }] } },
{ "key": ", o", "command": "runCommands",
"args": { "commands": ["whichkey.show", { "command": "whichkey.triggerKey", "args": "o" }] } },
{ "key": ", m", "command": "runCommands",
"when": "editorTextFocus",
"args": { "commands": ["whichkey.show", { "command": "whichkey.triggerKey", "args": "m" }] } },
{ "key": ", n", "command": "runCommands",
"when": "editorTextFocus",
"args": { "commands": ["whichkey.show", { "command": "whichkey.triggerKey", "args": "n" }] } },
{ "key": "ctrl+n", "command": "my-code.next" },
{ "key": "ctrl+p", "command": "my-code.prev" },
{ "key": ", space", "command": "type", "when": "editorTextFocus", "args": { "text": ", " } },
{ "key": ", ,", "command": "type", "when": "editorTextFocus", "args": { "text": "," } },
{ "key": ", enter", "command": "type", "when": "editorTextFocus", "args": { "text": ",\n" } },
{ "key": ", up", "command": "runCommands",
"args": {"commands": [{"command": "type", "when": "editorTextFocus", "args": { "text": "," } }, { "command": "cursorUp"}]}},
{ "key": ", down", "command": "runCommands",
"args": {"commands": [{"command": "type", "when": "editorTextFocus", "args": { "text": "," } }, { "command": "cursorDown"}]}},
{ "key": ", left", "command": "runCommands",
"args": {"commands": [{"command": "type", "when": "editorTextFocus", "args": { "text": "," } }, { "command": "cursorLeft"}]}},
{ "key": ", right", "command": "runCommands",
"args": {"commands": [{"command": "type", "when": "editorTextFocus", "args": { "text": "," } }, { "command": "cursorRight"}]}},
// Text Navigation
{ "key": "pageup", "command": "cursorMove",
"when": "editorTextFocus",
"args": { "by": "wrappedLine", "value": 36, "to": "up" } },
{ "key": "shift+pageup", "command": "cursorMove",
"when": "editorTextFocus",
"args": { "by": "wrappedLine", "value": 36, "to": "up", "select": true } },
{ "key": "pagedown", "command": "cursorMove",
"when": "editorTextFocus",
"args": { "by": "wrappedLine", "value": 36, "to": "down" }},
{ "key": "shift+pagedown", "command": "cursorMove",
"when": "editorTextFocus",
"args": { "by": "wrappedLine", "value": 36, "to": "down", "select": true } },
// Next/Prev
{ "key": "ctrl+down", "command": "workbench.action.editor.nextChange",
"when": "editorTextFocus && !suggestWidgetVisible" },
{ "key": "ctrl+up", "command": "workbench.action.editor.previousChange",
"when": "editorTextFocus && !suggestWidgetVisible" },
{ "key": "alt+down", "command": "search.action.focusNextSearchResult",
"when": "searchViewletVisible" },
{ "key": "alt+up", "command": "search.action.focusPreviousSearchResult",
"when": "searchViewletVisible" },
{ "key": "alt+down", "command": "references-view.next",
"when": "!searchViewletVisible" },
{ "key": "alt+up", "command": "references-view.prev",
"when": "!searchViewletVisible" },
{ "key": "ctrl+y", "command": "editor.action.marker.nextInFiles",
"when": "editorFocus && !editorReadonly" },
{ "key": "ctrl+shift+y", "command": "editor.action.marker.prevInFiles",
"when": "editorFocus && !editorReadonly" },
{ "key": "alt+left", "command": "workbench.action.navigateBack" },
{ "key": "alt+right", "command": "workbench.action.navigateForward" },
// Misc.
{ "key": "ctrl+c", "command": "workbench.action.terminal.copySelection",
"when": "terminalFocus" },
{ "key": "ctrl+escape", "command": "workbench.action.terminal.sendSequence",
"when": "terminalFocus",
"args": { "text": "\u0003" } },
{ "key": "ctrl+i", "command": "center-editor-window.center" },
{ "key": "ctrl+r", "command": "editor.action.rename",
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly" },
{ "key": "ctrl+r", "command": "renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus" },
{ "key": "alt+w", "command": "editor.action.addSelectionToNextFindMatch" },
{ "key": "ctrl+w", "command": "editor.action.smartSelect.expand",
"when": "editorTextFocus" },
{ "key": "ctrl+shift+w", "command": "editor.action.smartSelect.shrink",
"when": "editorTextFocus" },
{ "key": "ctrl+alt+right", "command": "cursorWordPartRight",
"when": "textInputFocus" },
{ "key": "ctrl+shift+alt+right", "command": "cursorWordPartRightSelect",
"when": "textInputFocus" },
{ "key": "ctrl+alt+left", "command": "cursorWordPartStartLeft",
"when": "textInputFocus" },
{ "key": "ctrl+shift+alt+left", "command": "cursorWordPartStartLeftSelect",
"when": "textInputFocus" },
{ "key": "ctrl+alt+backspace", "command": "deleteWordPartLeft",
"when": "textInputFocus && !editorReadonly" },
{ "key": "ctrl+alt+delete", "command": "deleteWordPartRight",
"when": "textInputFocus && !editorReadonly" },
// Negatives
{ "key": "down", "command": "-selectNextSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" },
{ "key": "up", "command": "-selectPrevSuggestion",
"when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus" },
{ "key": "ctrl+n", "command": "-workbench.action.files.newUntitledFile" },
{ "key": "ctrl+y", "command": "-redo" },
{ "key": "ctrl+[", "command": "-editor.action.outdentLines" },
{ "key": "ctrl+]", "command": "-editor.action.indentLines" },
{ "key": "ctrl+.", "command": "-editor.action.codeAction" },
{ "key": "ctrl+q", "command": "-workbench.action.quit" },
{ "key": "ctrl+o", "command": "-workbench.action.files.openFile" },
{ "key": "alt+q", "command": "-rewrap.rewrapComment" },
]