1[
2 // Standard Windows bindings
3 {
4 "use_key_equivalents": true,
5 "bindings": {
6 "home": "menu::SelectFirst",
7 "shift-pageup": "menu::SelectFirst",
8 "pageup": "menu::SelectFirst",
9 "end": "menu::SelectLast",
10 "shift-pagedown": "menu::SelectLast",
11 "pagedown": "menu::SelectLast",
12 "ctrl-n": "menu::SelectNext",
13 "tab": "menu::SelectNext",
14 "down": "menu::SelectNext",
15 "ctrl-p": "menu::SelectPrevious",
16 "shift-tab": "menu::SelectPrevious",
17 "up": "menu::SelectPrevious",
18 "enter": "menu::Confirm",
19 "ctrl-enter": "menu::SecondaryConfirm",
20 "ctrl-c": "menu::Cancel",
21 "escape": "menu::Cancel",
22 "shift-alt-enter": "menu::Restart",
23 "alt-enter": ["picker::ConfirmInput", { "secondary": false }],
24 "ctrl-alt-enter": ["picker::ConfirmInput", { "secondary": true }],
25 "ctrl-shift-w": "workspace::CloseWindow",
26 "shift-escape": "workspace::ToggleZoom",
27 "ctrl-o": "workspace::Open",
28 "ctrl-=": ["zed::IncreaseBufferFontSize", { "persist": false }],
29 "ctrl-shift-=": ["zed::IncreaseBufferFontSize", { "persist": false }],
30 "ctrl--": ["zed::DecreaseBufferFontSize", { "persist": false }],
31 "ctrl-0": ["zed::ResetBufferFontSize", { "persist": false }],
32 "ctrl-,": "zed::OpenSettings",
33 "ctrl-alt-,": "zed::OpenSettingsFile",
34 "ctrl-q": "zed::Quit",
35 "f4": "debugger::Start",
36 "shift-f5": "debugger::Stop",
37 "ctrl-shift-f5": "debugger::RerunSession",
38 "f6": "debugger::Pause",
39 "f7": "debugger::StepOver",
40 "ctrl-f11": "debugger::StepInto",
41 "shift-f11": "debugger::StepOut",
42 "f11": "zed::ToggleFullScreen",
43 "ctrl-shift-i": "edit_prediction::ToggleMenu",
44 "shift-alt-l": "lsp_tool::ToggleMenu",
45 "ctrl-alt-.": "project_panel::ToggleHideHidden"
46 }
47 },
48 {
49 "context": "Picker || menu",
50 "use_key_equivalents": true,
51 "bindings": {
52 "up": "menu::SelectPrevious",
53 "down": "menu::SelectNext"
54 }
55 },
56 {
57 "context": "Editor",
58 "use_key_equivalents": true,
59 "bindings": {
60 "escape": "editor::Cancel",
61 "shift-backspace": "editor::Backspace",
62 "backspace": "editor::Backspace",
63 "delete": "editor::Delete",
64 "tab": "editor::Tab",
65 "shift-tab": "editor::Backtab",
66 "ctrl-k": "editor::CutToEndOfLine",
67 "ctrl-k ctrl-q": "editor::Rewrap",
68 "ctrl-k q": "editor::Rewrap",
69 "ctrl-backspace": ["editor::DeleteToPreviousWordStart", { "ignore_newlines": false, "ignore_brackets": false }],
70 "ctrl-delete": ["editor::DeleteToNextWordEnd", { "ignore_newlines": false, "ignore_brackets": false }],
71 "shift-delete": "editor::Cut",
72 "ctrl-x": "editor::Cut",
73 "ctrl-insert": "editor::Copy",
74 "ctrl-c": "editor::Copy",
75 "shift-insert": "editor::Paste",
76 "ctrl-v": "editor::Paste",
77 "ctrl-z": "editor::Undo",
78 "ctrl-y": "editor::Redo",
79 "ctrl-shift-z": "editor::Redo",
80 "up": "editor::MoveUp",
81 "ctrl-up": "editor::LineUp",
82 "ctrl-down": "editor::LineDown",
83 "pageup": "editor::MovePageUp",
84 "alt-pageup": "editor::PageUp",
85 "shift-pageup": "editor::SelectPageUp",
86 "home": ["editor::MoveToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
87 "down": "editor::MoveDown",
88 "pagedown": "editor::MovePageDown",
89 "alt-pagedown": "editor::PageDown",
90 "shift-pagedown": "editor::SelectPageDown",
91 "end": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": true }],
92 "left": "editor::MoveLeft",
93 "right": "editor::MoveRight",
94 "ctrl-left": "editor::MoveToPreviousWordStart",
95 "ctrl-right": "editor::MoveToNextWordEnd",
96 "ctrl-home": "editor::MoveToBeginning",
97 "ctrl-end": "editor::MoveToEnd",
98 "shift-up": "editor::SelectUp",
99 "shift-down": "editor::SelectDown",
100 "shift-left": "editor::SelectLeft",
101 "shift-right": "editor::SelectRight",
102 "ctrl-shift-left": "editor::SelectToPreviousWordStart",
103 "ctrl-shift-right": "editor::SelectToNextWordEnd",
104 "ctrl-shift-home": "editor::SelectToBeginning",
105 "ctrl-shift-end": "editor::SelectToEnd",
106 "ctrl-a": "editor::SelectAll",
107 "ctrl-l": "editor::SelectLine",
108 "shift-alt-f": "editor::Format",
109 "shift-alt-o": "editor::OrganizeImports",
110 "shift-home": ["editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true, "stop_at_indent": true }],
111 "shift-end": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": true }],
112 "ctrl-alt-space": "editor::ShowCharacterPalette",
113 "ctrl-;": "editor::ToggleLineNumbers",
114 "ctrl-'": "editor::ToggleSelectedDiffHunks",
115 "ctrl-\"": "editor::ExpandAllDiffHunks",
116 "ctrl-i": "editor::ShowSignatureHelp",
117 "alt-g b": "git::Blame",
118 "alt-g m": "git::OpenModifiedFiles",
119 "menu": "editor::OpenContextMenu",
120 "shift-f10": "editor::OpenContextMenu",
121 "ctrl-shift-e": "editor::ToggleEditPrediction",
122 "f9": "editor::ToggleBreakpoint",
123 "shift-f9": "editor::EditLogBreakpoint"
124 }
125 },
126 {
127 "context": "Editor && mode == full",
128 "use_key_equivalents": true,
129 "bindings": {
130 "shift-enter": "editor::Newline",
131 "enter": "editor::Newline",
132 "ctrl-enter": "editor::NewlineBelow",
133 "ctrl-shift-enter": "editor::NewlineAbove",
134 "ctrl-k ctrl-z": "editor::ToggleSoftWrap",
135 "ctrl-k z": "editor::ToggleSoftWrap",
136 "ctrl-f": "buffer_search::Deploy",
137 "ctrl-h": "buffer_search::DeployReplace",
138 "ctrl-shift-.": "agent::AddSelectionToThread",
139 "ctrl-shift-,": "assistant::InsertIntoEditor",
140 "shift-alt-e": "editor::SelectEnclosingSymbol",
141 "ctrl-shift-backspace": "editor::GoToPreviousChange",
142 "ctrl-shift-alt-backspace": "editor::GoToNextChange",
143 "alt-enter": "editor::OpenSelectionsInMultibuffer"
144 }
145 },
146 {
147 "context": "Editor && mode == full && edit_prediction",
148 "use_key_equivalents": true,
149 "bindings": {
150 "alt-]": "editor::NextEditPrediction",
151 "alt-[": "editor::PreviousEditPrediction"
152 }
153 },
154 {
155 "context": "Editor && !edit_prediction",
156 "use_key_equivalents": true,
157 "bindings": {
158 "alt-\\": "editor::ShowEditPrediction"
159 }
160 },
161 {
162 "context": "Editor && mode == auto_height",
163 "use_key_equivalents": true,
164 "bindings": {
165 "ctrl-enter": "editor::Newline",
166 "shift-enter": "editor::Newline",
167 "ctrl-shift-enter": "editor::NewlineBelow"
168 }
169 },
170 {
171 "context": "Markdown",
172 "use_key_equivalents": true,
173 "bindings": {
174 "ctrl-c": "markdown::Copy"
175 }
176 },
177 {
178 "context": "Editor && jupyter && !ContextEditor",
179 "use_key_equivalents": true,
180 "bindings": {
181 "ctrl-shift-enter": "repl::Run",
182 "ctrl-alt-enter": "repl::RunInPlace"
183 }
184 },
185 {
186 "context": "Editor && !agent_diff",
187 "use_key_equivalents": true,
188 "bindings": {
189 "ctrl-k ctrl-r": "git::Restore",
190 "alt-y": "git::StageAndNext",
191 "shift-alt-y": "git::UnstageAndNext"
192 }
193 },
194 {
195 "context": "Editor && editor_agent_diff",
196 "use_key_equivalents": true,
197 "bindings": {
198 "ctrl-y": "agent::Keep",
199 "ctrl-n": "agent::Reject",
200 "ctrl-shift-y": "agent::KeepAll",
201 "ctrl-shift-n": "agent::RejectAll",
202 "ctrl-shift-r": "agent::OpenAgentDiff"
203 }
204 },
205 {
206 "context": "AgentDiff",
207 "use_key_equivalents": true,
208 "bindings": {
209 "ctrl-y": "agent::Keep",
210 "ctrl-n": "agent::Reject",
211 "ctrl-shift-y": "agent::KeepAll",
212 "ctrl-shift-n": "agent::RejectAll"
213 }
214 },
215 {
216 "context": "ContextEditor > Editor",
217 "use_key_equivalents": true,
218 "bindings": {
219 "ctrl-enter": "assistant::Assist",
220 "ctrl-s": "workspace::Save",
221 "ctrl-shift-,": "assistant::InsertIntoEditor",
222 "shift-enter": "assistant::Split",
223 "ctrl-r": "assistant::CycleMessageRole",
224 "enter": "assistant::ConfirmCommand",
225 "alt-enter": "editor::Newline",
226 "ctrl-k c": "assistant::CopyCode",
227 "ctrl-g": "search::SelectNextMatch",
228 "ctrl-shift-g": "search::SelectPreviousMatch",
229 "ctrl-k l": "agent::OpenRulesLibrary"
230 }
231 },
232 {
233 "context": "AgentPanel",
234 "use_key_equivalents": true,
235 "bindings": {
236 "ctrl-n": "agent::NewThread",
237 "shift-alt-n": "agent::NewTextThread",
238 "ctrl-shift-h": "agent::OpenHistory",
239 "shift-alt-c": "agent::OpenSettings",
240 "shift-alt-l": "agent::OpenRulesLibrary",
241 "shift-alt-p": "agent::ManageProfiles",
242 "ctrl-i": "agent::ToggleProfileSelector",
243 "shift-alt-/": "agent::ToggleModelSelector",
244 "ctrl-shift-a": "agent::ToggleContextPicker",
245 "ctrl-shift-j": "agent::ToggleNavigationMenu",
246 "ctrl-alt-i": "agent::ToggleOptionsMenu",
247 // "ctrl-shift-alt-n": "agent::ToggleNewThreadMenu",
248 "shift-alt-escape": "agent::ExpandMessageEditor",
249 "ctrl-shift-.": "agent::AddSelectionToThread",
250 "shift-alt-e": "agent::RemoveAllContext",
251 "ctrl-shift-e": "project_panel::ToggleFocus",
252 "ctrl-shift-enter": "agent::ContinueThread",
253 "super-ctrl-b": "agent::ToggleBurnMode",
254 "alt-enter": "agent::ContinueWithBurnMode",
255 "ctrl-y": "agent::AllowOnce",
256 "ctrl-alt-y": "agent::AllowAlways",
257 "ctrl-alt-z": "agent::RejectOnce"
258 }
259 },
260 {
261 "context": "AgentPanel > NavigationMenu",
262 "use_key_equivalents": true,
263 "bindings": {
264 "shift-backspace": "agent::DeleteRecentlyOpenThread"
265 }
266 },
267 {
268 "context": "AgentPanel > Markdown",
269 "use_key_equivalents": true,
270 "bindings": {
271 "ctrl-c": "markdown::CopyAsMarkdown"
272 }
273 },
274 {
275 "context": "AgentPanel && text_thread",
276 "use_key_equivalents": true,
277 "bindings": {
278 "ctrl-n": "agent::NewTextThread",
279 "ctrl-alt-t": "agent::NewThread"
280 }
281 },
282 {
283 "context": "AgentPanel && acp_thread",
284 "use_key_equivalents": true,
285 "bindings": {
286 "ctrl-n": "agent::NewExternalAgentThread",
287 "ctrl-alt-t": "agent::NewThread"
288 }
289 },
290 {
291 "context": "MessageEditor && !Picker > Editor && !use_modifier_to_send",
292 "use_key_equivalents": true,
293 "bindings": {
294 "enter": "agent::Chat",
295 "ctrl-enter": "agent::ChatWithFollow",
296 "ctrl-i": "agent::ToggleProfileSelector",
297 "ctrl-shift-r": "agent::OpenAgentDiff",
298 "ctrl-shift-y": "agent::KeepAll",
299 "ctrl-shift-n": "agent::RejectAll"
300 }
301 },
302 {
303 "context": "MessageEditor && !Picker > Editor && use_modifier_to_send",
304 "use_key_equivalents": true,
305 "bindings": {
306 "ctrl-enter": "agent::Chat",
307 "enter": "editor::Newline",
308 "ctrl-i": "agent::ToggleProfileSelector",
309 "ctrl-shift-r": "agent::OpenAgentDiff",
310 "ctrl-shift-y": "agent::KeepAll",
311 "ctrl-shift-n": "agent::RejectAll"
312 }
313 },
314 {
315 "context": "EditMessageEditor > Editor",
316 "use_key_equivalents": true,
317 "bindings": {
318 "escape": "menu::Cancel",
319 "enter": "menu::Confirm",
320 "alt-enter": "editor::Newline"
321 }
322 },
323 {
324 "context": "AgentFeedbackMessageEditor > Editor",
325 "use_key_equivalents": true,
326 "bindings": {
327 "escape": "menu::Cancel",
328 "enter": "menu::Confirm",
329 "alt-enter": "editor::Newline"
330 }
331 },
332 {
333 "context": "ContextStrip",
334 "use_key_equivalents": true,
335 "bindings": {
336 "up": "agent::FocusUp",
337 "right": "agent::FocusRight",
338 "left": "agent::FocusLeft",
339 "down": "agent::FocusDown",
340 "backspace": "agent::RemoveFocusedContext",
341 "enter": "agent::AcceptSuggestedContext"
342 }
343 },
344 {
345 "context": "AcpThread > ModeSelector",
346 "bindings": {
347 "ctrl-enter": "menu::Confirm"
348 }
349 },
350 {
351 "context": "AcpThread > Editor && !use_modifier_to_send",
352 "use_key_equivalents": true,
353 "bindings": {
354 "enter": "agent::Chat",
355 "ctrl-shift-r": "agent::OpenAgentDiff",
356 "ctrl-shift-y": "agent::KeepAll",
357 "ctrl-shift-n": "agent::RejectAll",
358 "shift-tab": "agent::CycleModeSelector"
359 }
360 },
361 {
362 "context": "AcpThread > Editor && use_modifier_to_send",
363 "use_key_equivalents": true,
364 "bindings": {
365 "ctrl-enter": "agent::Chat",
366 "ctrl-shift-r": "agent::OpenAgentDiff",
367 "ctrl-shift-y": "agent::KeepAll",
368 "ctrl-shift-n": "agent::RejectAll",
369 "shift-tab": "agent::CycleModeSelector"
370 }
371 },
372 {
373 "context": "ThreadHistory",
374 "use_key_equivalents": true,
375 "bindings": {
376 "backspace": "agent::RemoveSelectedThread"
377 }
378 },
379 {
380 "context": "RulesLibrary",
381 "use_key_equivalents": true,
382 "bindings": {
383 "ctrl-n": "rules_library::NewRule",
384 "ctrl-shift-s": "rules_library::ToggleDefaultRule",
385 "ctrl-w": "workspace::CloseWindow"
386 }
387 },
388 {
389 "context": "BufferSearchBar",
390 "use_key_equivalents": true,
391 "bindings": {
392 "escape": "buffer_search::Dismiss",
393 "tab": "buffer_search::FocusEditor",
394 "enter": "search::SelectNextMatch",
395 "shift-enter": "search::SelectPreviousMatch",
396 "alt-enter": "search::SelectAllMatches",
397 "ctrl-f": "search::FocusSearch",
398 "ctrl-h": "search::ToggleReplace",
399 "ctrl-l": "search::ToggleSelection"
400 }
401 },
402 {
403 "context": "BufferSearchBar && in_replace > Editor",
404 "use_key_equivalents": true,
405 "bindings": {
406 "enter": "search::ReplaceNext",
407 "ctrl-enter": "search::ReplaceAll"
408 }
409 },
410 {
411 "context": "BufferSearchBar && !in_replace > Editor",
412 "use_key_equivalents": true,
413 "bindings": {
414 "up": "search::PreviousHistoryQuery",
415 "down": "search::NextHistoryQuery"
416 }
417 },
418 {
419 "context": "ProjectSearchBar",
420 "use_key_equivalents": true,
421 "bindings": {
422 "escape": "project_search::ToggleFocus",
423 "ctrl-shift-f": "search::FocusSearch",
424 "ctrl-shift-h": "search::ToggleReplace",
425 "alt-r": "search::ToggleRegex" // vscode
426 }
427 },
428 {
429 "context": "ProjectSearchBar > Editor",
430 "use_key_equivalents": true,
431 "bindings": {
432 "up": "search::PreviousHistoryQuery",
433 "down": "search::NextHistoryQuery"
434 }
435 },
436 {
437 "context": "ProjectSearchBar && in_replace > Editor",
438 "use_key_equivalents": true,
439 "bindings": {
440 "enter": "search::ReplaceNext",
441 "ctrl-alt-enter": "search::ReplaceAll"
442 }
443 },
444 {
445 "context": "ProjectSearchView",
446 "use_key_equivalents": true,
447 "bindings": {
448 "escape": "project_search::ToggleFocus",
449 "ctrl-shift-h": "search::ToggleReplace",
450 "alt-r": "search::ToggleRegex" // vscode
451 }
452 },
453 {
454 "context": "Pane",
455 "use_key_equivalents": true,
456 "bindings": {
457 "alt-1": ["pane::ActivateItem", 0],
458 "alt-2": ["pane::ActivateItem", 1],
459 "alt-3": ["pane::ActivateItem", 2],
460 "alt-4": ["pane::ActivateItem", 3],
461 "alt-5": ["pane::ActivateItem", 4],
462 "alt-6": ["pane::ActivateItem", 5],
463 "alt-7": ["pane::ActivateItem", 6],
464 "alt-8": ["pane::ActivateItem", 7],
465 "alt-9": ["pane::ActivateItem", 8],
466 "alt-0": "pane::ActivateLastItem",
467 "ctrl-pageup": "pane::ActivatePreviousItem",
468 "ctrl-pagedown": "pane::ActivateNextItem",
469 "ctrl-shift-pageup": "pane::SwapItemLeft",
470 "ctrl-shift-pagedown": "pane::SwapItemRight",
471 "ctrl-f4": ["pane::CloseActiveItem", { "close_pinned": false }],
472 "ctrl-w": ["pane::CloseActiveItem", { "close_pinned": false }],
473 "ctrl-shift-alt-t": ["pane::CloseOtherItems", { "close_pinned": false }],
474 "ctrl-shift-alt-w": "workspace::CloseInactiveTabsAndPanes",
475 "ctrl-k e": ["pane::CloseItemsToTheLeft", { "close_pinned": false }],
476 "ctrl-k t": ["pane::CloseItemsToTheRight", { "close_pinned": false }],
477 "ctrl-k u": ["pane::CloseCleanItems", { "close_pinned": false }],
478 "ctrl-k w": ["pane::CloseAllItems", { "close_pinned": false }],
479 "ctrl-k ctrl-w": "workspace::CloseAllItemsAndPanes",
480 "back": "pane::GoBack",
481 "alt--": "pane::GoBack",
482 "forward": "pane::GoForward",
483 "alt-=": "pane::GoForward",
484 "f3": "search::SelectNextMatch",
485 "shift-f3": "search::SelectPreviousMatch",
486 "ctrl-shift-f": "project_search::ToggleFocus",
487 "shift-alt-h": "search::ToggleReplace",
488 "alt-l": "search::ToggleSelection",
489 "alt-enter": "search::SelectAllMatches",
490 "alt-c": "search::ToggleCaseSensitive",
491 "alt-w": "search::ToggleWholeWord",
492 "alt-f": "project_search::ToggleFilters",
493 "shift-enter": "project_search::ToggleAllSearchResults",
494 "alt-r": "search::ToggleRegex",
495 // "ctrl-shift-alt-x": "search::ToggleRegex",
496 "ctrl-k shift-enter": "pane::TogglePinTab"
497 }
498 },
499 // Bindings from VS Code
500 {
501 "context": "Editor",
502 "use_key_equivalents": true,
503 "bindings": {
504 "ctrl-[": "editor::Outdent",
505 "ctrl-]": "editor::Indent",
506 "ctrl-shift-alt-up": ["editor::AddSelectionAbove", { "skip_soft_wrap": true }], // Insert Cursor Above
507 "ctrl-shift-alt-down": ["editor::AddSelectionBelow", { "skip_soft_wrap": true }], // Insert Cursor Below
508 "ctrl-shift-k": "editor::DeleteLine",
509 "alt-up": "editor::MoveLineUp",
510 "alt-down": "editor::MoveLineDown",
511 "shift-alt-up": "editor::DuplicateLineUp",
512 "shift-alt-down": "editor::DuplicateLineDown",
513 "shift-alt-right": "editor::SelectLargerSyntaxNode", // Expand selection
514 "shift-alt-left": "editor::SelectSmallerSyntaxNode", // Shrink selection
515 "ctrl-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection
516 "ctrl-f2": "editor::SelectAllMatches", // Select all occurrences of current word
517 "ctrl-d": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand
518 "ctrl-shift-down": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch
519 "ctrl-shift-up": ["editor::SelectPrevious", { "replace_newest": false }], // editor.action.addSelectionToPreviousFindMatch
520 "ctrl-k ctrl-d": ["editor::SelectNext", { "replace_newest": true }], // editor.action.moveSelectionToNextFindMatch / find_under_expand_skip
521 "ctrl-k ctrl-shift-d": ["editor::SelectPrevious", { "replace_newest": true }], // editor.action.moveSelectionToPreviousFindMatch
522 "ctrl-k ctrl-i": "editor::Hover",
523 "ctrl-k ctrl-b": "editor::BlameHover",
524 "ctrl-/": ["editor::ToggleComments", { "advance_downwards": false }],
525 "f8": ["editor::GoToDiagnostic", { "severity": { "min": "hint", "max": "error" } }],
526 "shift-f8": ["editor::GoToPreviousDiagnostic", { "severity": { "min": "hint", "max": "error" } }],
527 "f2": "editor::Rename",
528 "f12": "editor::GoToDefinition",
529 "alt-f12": "editor::GoToDefinitionSplit",
530 "ctrl-shift-f10": "editor::GoToDefinitionSplit",
531 "ctrl-f12": "editor::GoToImplementation",
532 "shift-f12": "editor::GoToTypeDefinition",
533 "ctrl-alt-f12": "editor::GoToTypeDefinitionSplit",
534 "shift-alt-f12": "editor::FindAllReferences",
535 "ctrl-m": "editor::MoveToEnclosingBracket", // from jetbrains
536 "ctrl-shift-\\": "editor::MoveToEnclosingBracket",
537 "ctrl-shift-[": "editor::Fold",
538 "ctrl-shift-]": "editor::UnfoldLines",
539 "ctrl-k ctrl-l": "editor::ToggleFold",
540 "ctrl-k ctrl-[": "editor::FoldRecursive",
541 "ctrl-k ctrl-]": "editor::UnfoldRecursive",
542 "ctrl-k ctrl-1": "editor::FoldAtLevel_1",
543 "ctrl-k ctrl-2": "editor::FoldAtLevel_2",
544 "ctrl-k ctrl-3": "editor::FoldAtLevel_3",
545 "ctrl-k ctrl-4": "editor::FoldAtLevel_4",
546 "ctrl-k ctrl-5": "editor::FoldAtLevel_5",
547 "ctrl-k ctrl-6": "editor::FoldAtLevel_6",
548 "ctrl-k ctrl-7": "editor::FoldAtLevel_7",
549 "ctrl-k ctrl-8": "editor::FoldAtLevel_8",
550 "ctrl-k ctrl-9": "editor::FoldAtLevel_9",
551 "ctrl-k ctrl-0": "editor::FoldAll",
552 "ctrl-k ctrl-j": "editor::UnfoldAll",
553 "ctrl-space": "editor::ShowCompletions",
554 "ctrl-shift-space": "editor::ShowWordCompletions",
555 "ctrl-.": "editor::ToggleCodeActions",
556 "ctrl-k r": "editor::RevealInFileManager",
557 "ctrl-k p": "editor::CopyPath",
558 "ctrl-\\": "pane::SplitRight",
559 "ctrl-shift-alt-c": "editor::DisplayCursorNames",
560 "alt-.": "editor::GoToHunk",
561 "alt-,": "editor::GoToPreviousHunk"
562 }
563 },
564 {
565 "context": "Editor && extension == md",
566 "use_key_equivalents": true,
567 "bindings": {
568 "ctrl-k v": "markdown::OpenPreviewToTheSide",
569 "ctrl-shift-v": "markdown::OpenPreview"
570 }
571 },
572 {
573 "context": "Editor && extension == svg",
574 "use_key_equivalents": true,
575 "bindings": {
576 "ctrl-k v": "svg::OpenPreviewToTheSide",
577 "ctrl-shift-v": "svg::OpenPreview"
578 }
579 },
580 {
581 "context": "Editor && mode == full",
582 "use_key_equivalents": true,
583 "bindings": {
584 "ctrl-shift-o": "outline::Toggle",
585 "ctrl-g": "go_to_line::Toggle"
586 }
587 },
588 {
589 "context": "Workspace",
590 "use_key_equivalents": true,
591 "bindings": {
592 // Change the default action on `menu::Confirm` by setting the parameter
593 // "ctrl-alt-o": ["projects::OpenRecent", { "create_new_window": true }],
594 "ctrl-r": ["projects::OpenRecent", { "create_new_window": false }],
595 // Change to open path modal for existing remote connection by setting the parameter
596 // "ctrl-shift-alt-o": "["projects::OpenRemote", { "from_existing_connection": true }]",
597 "ctrl-shift-alt-o": ["projects::OpenRemote", { "from_existing_connection": false, "create_new_window": false }],
598 "shift-alt-b": "branches::OpenRecent",
599 "shift-alt-enter": "toast::RunAction",
600 "ctrl-shift-`": "workspace::NewTerminal",
601 "ctrl-s": "workspace::Save",
602 "ctrl-k ctrl-shift-s": "workspace::SaveWithoutFormat",
603 "ctrl-shift-s": "workspace::SaveAs",
604 "ctrl-n": "workspace::NewFile",
605 "ctrl-shift-n": "workspace::NewWindow",
606 "ctrl-`": "terminal_panel::Toggle",
607 "f10": ["app_menu::OpenApplicationMenu", "Zed"],
608 "alt-1": ["workspace::ActivatePane", 0],
609 "alt-2": ["workspace::ActivatePane", 1],
610 "alt-3": ["workspace::ActivatePane", 2],
611 "alt-4": ["workspace::ActivatePane", 3],
612 "alt-5": ["workspace::ActivatePane", 4],
613 "alt-6": ["workspace::ActivatePane", 5],
614 "alt-7": ["workspace::ActivatePane", 6],
615 "alt-8": ["workspace::ActivatePane", 7],
616 "alt-9": ["workspace::ActivatePane", 8],
617 "ctrl-alt-b": "workspace::ToggleRightDock",
618 "ctrl-b": "workspace::ToggleLeftDock",
619 "ctrl-j": "workspace::ToggleBottomDock",
620 "ctrl-shift-y": "workspace::ToggleAllDocks",
621 "alt-r": "workspace::ResetActiveDockSize",
622 // For 0px parameter, uses UI font size value.
623 "shift-alt--": ["workspace::DecreaseActiveDockSize", { "px": 0 }],
624 "shift-alt-=": ["workspace::IncreaseActiveDockSize", { "px": 0 }],
625 "shift-alt-0": "workspace::ResetOpenDocksSize",
626 "ctrl-shift-f": "pane::DeploySearch",
627 "ctrl-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],
628 "ctrl-shift-t": "pane::ReopenClosedItem",
629 "ctrl-k ctrl-s": "zed::OpenKeymap",
630 "ctrl-k ctrl-t": "theme_selector::Toggle",
631 "ctrl-alt-super-p": "settings_profile_selector::Toggle",
632 "ctrl-t": "project_symbols::Toggle",
633 "ctrl-p": "file_finder::Toggle",
634 "ctrl-tab": "tab_switcher::Toggle",
635 "ctrl-shift-tab": ["tab_switcher::Toggle", { "select_last": true }],
636 "ctrl-e": "file_finder::Toggle",
637 "f1": "command_palette::Toggle",
638 "ctrl-shift-p": "command_palette::Toggle",
639 "ctrl-shift-m": "diagnostics::Deploy",
640 "ctrl-shift-e": "project_panel::ToggleFocus",
641 "ctrl-shift-b": "outline_panel::ToggleFocus",
642 "ctrl-shift-g": "git_panel::ToggleFocus",
643 "ctrl-shift-d": "debug_panel::ToggleFocus",
644 "ctrl-shift-/": "agent::ToggleFocus",
645 "ctrl-k s": "workspace::SaveAll",
646 "ctrl-k m": "language_selector::Toggle",
647 "ctrl-m ctrl-m": "toolchain::AddToolchain",
648 "escape": "workspace::Unfollow",
649 "ctrl-k ctrl-left": "workspace::ActivatePaneLeft",
650 "ctrl-k ctrl-right": "workspace::ActivatePaneRight",
651 "ctrl-k ctrl-up": "workspace::ActivatePaneUp",
652 "ctrl-k ctrl-down": "workspace::ActivatePaneDown",
653 "ctrl-k shift-left": "workspace::SwapPaneLeft",
654 "ctrl-k shift-right": "workspace::SwapPaneRight",
655 "ctrl-k shift-up": "workspace::SwapPaneUp",
656 "ctrl-k shift-down": "workspace::SwapPaneDown",
657 "ctrl-shift-x": "zed::Extensions",
658 // All task parameters are captured and unchanged between reruns by default.
659 // Use the `"reevaluate_context"` parameter to control this.
660 "ctrl-shift-r": ["task::Rerun", { "reevaluate_context": false }],
661 "alt-t": "task::Rerun",
662 "shift-alt-t": "task::Spawn",
663 "shift-alt-r": ["task::Spawn", { "reveal_target": "center" }],
664 // also possible to spawn tasks by name:
665 // "foo-bar": ["task::Spawn", { "task_name": "MyTask", "reveal_target": "dock" }]
666 // or by tag:
667 // "foo-bar": ["task::Spawn", { "task_tag": "MyTag" }],
668 "f5": "debugger::Rerun",
669 "ctrl-f4": "workspace::CloseActiveDock",
670 "ctrl-w": "workspace::CloseActiveDock"
671 }
672 },
673 {
674 "context": "Workspace && debugger_running",
675 "use_key_equivalents": true,
676 "bindings": {
677 "f5": "zed::NoAction"
678 }
679 },
680 {
681 "context": "Workspace && debugger_stopped",
682 "use_key_equivalents": true,
683 "bindings": {
684 "f5": "debugger::Continue"
685 }
686 },
687 {
688 "context": "ApplicationMenu",
689 "use_key_equivalents": true,
690 "bindings": {
691 "f10": "menu::Cancel",
692 "left": "app_menu::ActivateMenuLeft",
693 "right": "app_menu::ActivateMenuRight"
694 }
695 },
696 // Bindings from Sublime Text
697 {
698 "context": "Editor",
699 "use_key_equivalents": true,
700 "bindings": {
701 "ctrl-u": "editor::UndoSelection",
702 "ctrl-shift-u": "editor::RedoSelection",
703 "ctrl-shift-j": "editor::JoinLines",
704 "ctrl-alt-backspace": "editor::DeleteToPreviousSubwordStart",
705 "shift-alt-h": "editor::DeleteToPreviousSubwordStart",
706 "ctrl-alt-delete": "editor::DeleteToNextSubwordEnd",
707 "shift-alt-d": "editor::DeleteToNextSubwordEnd",
708 "ctrl-alt-left": "editor::MoveToPreviousSubwordStart",
709 "ctrl-alt-right": "editor::MoveToNextSubwordEnd",
710 "ctrl-shift-alt-left": "editor::SelectToPreviousSubwordStart",
711 "ctrl-shift-alt-right": "editor::SelectToNextSubwordEnd"
712 }
713 },
714 // Bindings from Atom
715 {
716 "context": "Pane",
717 "use_key_equivalents": true,
718 "bindings": {
719 "ctrl-k up": "pane::SplitUp",
720 "ctrl-k down": "pane::SplitDown",
721 "ctrl-k left": "pane::SplitLeft",
722 "ctrl-k right": "pane::SplitRight"
723 }
724 },
725 // Bindings that should be unified with bindings for more general actions
726 {
727 "context": "Editor && renaming",
728 "use_key_equivalents": true,
729 "bindings": {
730 "enter": "editor::ConfirmRename"
731 }
732 },
733 {
734 "context": "Editor && showing_completions",
735 "use_key_equivalents": true,
736 "bindings": {
737 "enter": "editor::ConfirmCompletion",
738 "shift-enter": "editor::ConfirmCompletionReplace",
739 "tab": "editor::ComposeCompletion"
740 }
741 },
742 {
743 "context": "Editor && in_snippet && has_next_tabstop && !showing_completions",
744 "use_key_equivalents": true,
745 "bindings": {
746 "tab": "editor::NextSnippetTabstop"
747 }
748 },
749 {
750 "context": "Editor && in_snippet && has_previous_tabstop && !showing_completions",
751 "use_key_equivalents": true,
752 "bindings": {
753 "shift-tab": "editor::PreviousSnippetTabstop"
754 }
755 },
756 // Bindings for accepting edit predictions
757 //
758 // alt-l is provided as an alternative to tab/alt-tab. and will be displayed in the UI. This is
759 // because alt-tab may not be available, as it is often used for window switching.
760 {
761 "context": "Editor && edit_prediction",
762 "use_key_equivalents": true,
763 "bindings": {
764 "alt-tab": "editor::AcceptEditPrediction",
765 "alt-l": "editor::AcceptEditPrediction",
766 "tab": "editor::AcceptEditPrediction",
767 "alt-right": "editor::AcceptPartialEditPrediction"
768 }
769 },
770 {
771 "context": "Editor && edit_prediction_conflict",
772 "use_key_equivalents": true,
773 "bindings": {
774 "alt-tab": "editor::AcceptEditPrediction",
775 "alt-l": "editor::AcceptEditPrediction",
776 "alt-right": "editor::AcceptPartialEditPrediction"
777 }
778 },
779 {
780 "context": "Editor && showing_code_actions",
781 "use_key_equivalents": true,
782 "bindings": {
783 "enter": "editor::ConfirmCodeAction"
784 }
785 },
786 {
787 "context": "Editor && (showing_code_actions || showing_completions)",
788 "use_key_equivalents": true,
789 "bindings": {
790 "ctrl-p": "editor::ContextMenuPrevious",
791 "up": "editor::ContextMenuPrevious",
792 "ctrl-n": "editor::ContextMenuNext",
793 "down": "editor::ContextMenuNext",
794 "pageup": "editor::ContextMenuFirst",
795 "pagedown": "editor::ContextMenuLast"
796 }
797 },
798 {
799 "context": "Editor && showing_signature_help && !showing_completions",
800 "use_key_equivalents": true,
801 "bindings": {
802 "up": "editor::SignatureHelpPrevious",
803 "down": "editor::SignatureHelpNext"
804 }
805 },
806 // Custom bindings
807 {
808 "use_key_equivalents": true,
809 "bindings": {
810 "ctrl-shift-alt-f": "workspace::FollowNextCollaborator",
811 // Only available in debug builds: opens an element inspector for development.
812 "shift-alt-i": "dev::ToggleInspector"
813 }
814 },
815 {
816 "context": "!Terminal",
817 "use_key_equivalents": true,
818 "bindings": {
819 "ctrl-shift-c": "collab_panel::ToggleFocus"
820 }
821 },
822 {
823 "context": "!ContextEditor > Editor && mode == full",
824 "use_key_equivalents": true,
825 "bindings": {
826 "alt-enter": "editor::OpenExcerpts",
827 "shift-enter": "editor::ExpandExcerpts",
828 "ctrl-alt-enter": "editor::OpenExcerptsSplit",
829 "ctrl-shift-e": "pane::RevealInProjectPanel",
830 "ctrl-f8": "editor::GoToHunk",
831 "ctrl-shift-f8": "editor::GoToPreviousHunk",
832 "ctrl-enter": "assistant::InlineAssist",
833 "ctrl-shift-;": "editor::ToggleInlayHints"
834 }
835 },
836 {
837 "context": "PromptEditor",
838 "use_key_equivalents": true,
839 "bindings": {
840 "ctrl-[": "agent::CyclePreviousInlineAssist",
841 "ctrl-]": "agent::CycleNextInlineAssist",
842 "shift-alt-e": "agent::RemoveAllContext"
843 }
844 },
845 {
846 "context": "Prompt",
847 "use_key_equivalents": true,
848 "bindings": {
849 "left": "menu::SelectPrevious",
850 "right": "menu::SelectNext",
851 "h": "menu::SelectPrevious",
852 "l": "menu::SelectNext"
853 }
854 },
855 {
856 "context": "ProjectSearchBar && !in_replace",
857 "use_key_equivalents": true,
858 "bindings": {
859 "ctrl-enter": "project_search::SearchInNew"
860 }
861 },
862 {
863 "context": "OutlinePanel && not_editing",
864 "use_key_equivalents": true,
865 "bindings": {
866 "left": "outline_panel::CollapseSelectedEntry",
867 "right": "outline_panel::ExpandSelectedEntry",
868 "shift-alt-c": "outline_panel::CopyPath",
869 "ctrl-shift-alt-c": "workspace::CopyRelativePath",
870 "ctrl-alt-r": "outline_panel::RevealInFileManager",
871 "space": "outline_panel::OpenSelectedEntry",
872 "shift-down": "menu::SelectNext",
873 "shift-up": "menu::SelectPrevious",
874 "alt-enter": "editor::OpenExcerpts",
875 "ctrl-alt-enter": "editor::OpenExcerptsSplit"
876 }
877 },
878 {
879 "context": "ProjectPanel",
880 "use_key_equivalents": true,
881 "bindings": {
882 "left": "project_panel::CollapseSelectedEntry",
883 "right": "project_panel::ExpandSelectedEntry",
884 "ctrl-n": "project_panel::NewFile",
885 "alt-n": "project_panel::NewDirectory",
886 "ctrl-x": "project_panel::Cut",
887 "ctrl-insert": "project_panel::Copy",
888 "ctrl-c": "project_panel::Copy",
889 "shift-insert": "project_panel::Paste",
890 "ctrl-v": "project_panel::Paste",
891 "shift-alt-c": "project_panel::CopyPath",
892 "ctrl-k ctrl-shift-c": "workspace::CopyRelativePath",
893 "enter": "project_panel::Rename",
894 "f2": "project_panel::Rename",
895 "backspace": ["project_panel::Trash", { "skip_prompt": false }],
896 "delete": ["project_panel::Trash", { "skip_prompt": false }],
897 "shift-delete": ["project_panel::Delete", { "skip_prompt": false }],
898 "ctrl-backspace": ["project_panel::Delete", { "skip_prompt": false }],
899 "ctrl-delete": ["project_panel::Delete", { "skip_prompt": false }],
900 "ctrl-alt-r": "project_panel::RevealInFileManager",
901 "ctrl-shift-enter": "project_panel::OpenWithSystem",
902 "alt-d": "project_panel::CompareMarkedFiles",
903 "ctrl-k ctrl-shift-f": "project_panel::NewSearchInDirectory",
904 "shift-down": "menu::SelectNext",
905 "shift-up": "menu::SelectPrevious",
906 "escape": "menu::Cancel"
907 }
908 },
909 {
910 "context": "ProjectPanel && not_editing",
911 "use_key_equivalents": true,
912 "bindings": {
913 "space": "project_panel::Open"
914 }
915 },
916 {
917 "context": "GitPanel && ChangesList",
918 "use_key_equivalents": true,
919 "bindings": {
920 "up": "menu::SelectPrevious",
921 "down": "menu::SelectNext",
922 "enter": "menu::Confirm",
923 "alt-y": "git::StageFile",
924 "shift-alt-y": "git::UnstageFile",
925 "space": "git::ToggleStaged",
926 "shift-space": "git::StageRange",
927 "tab": "git_panel::FocusEditor",
928 "shift-tab": "git_panel::FocusEditor",
929 "escape": "git_panel::ToggleFocus",
930 "alt-enter": "menu::SecondaryConfirm",
931 "delete": ["git::RestoreFile", { "skip_prompt": false }],
932 "backspace": ["git::RestoreFile", { "skip_prompt": false }],
933 "shift-delete": ["git::RestoreFile", { "skip_prompt": false }],
934 "ctrl-backspace": ["git::RestoreFile", { "skip_prompt": false }],
935 "ctrl-delete": ["git::RestoreFile", { "skip_prompt": false }]
936 }
937 },
938 {
939 "context": "GitPanel && CommitEditor",
940 "use_key_equivalents": true,
941 "bindings": {
942 "escape": "git::Cancel"
943 }
944 },
945 {
946 "context": "GitCommit > Editor",
947 "use_key_equivalents": true,
948 "bindings": {
949 "escape": "menu::Cancel",
950 "enter": "editor::Newline",
951 "ctrl-enter": "git::Commit",
952 "ctrl-shift-enter": "git::Amend",
953 "alt-l": "git::GenerateCommitMessage"
954 }
955 },
956 {
957 "context": "GitPanel",
958 "use_key_equivalents": true,
959 "bindings": {
960 "ctrl-g ctrl-g": "git::Fetch",
961 "ctrl-g up": "git::Push",
962 "ctrl-g down": "git::Pull",
963 "ctrl-g shift-down": "git::PullRebase",
964 "ctrl-g shift-up": "git::ForcePush",
965 "ctrl-g d": "git::Diff",
966 "ctrl-g backspace": "git::RestoreTrackedFiles",
967 "ctrl-g shift-backspace": "git::TrashUntrackedFiles",
968 "ctrl-space": "git::StageAll",
969 "ctrl-shift-space": "git::UnstageAll",
970 "ctrl-enter": "git::Commit",
971 "ctrl-shift-enter": "git::Amend"
972 }
973 },
974 {
975 "context": "GitDiff > Editor",
976 "use_key_equivalents": true,
977 "bindings": {
978 "ctrl-enter": "git::Commit",
979 "ctrl-shift-enter": "git::Amend",
980 "ctrl-space": "git::StageAll",
981 "ctrl-shift-space": "git::UnstageAll"
982 }
983 },
984 {
985 "context": "AskPass > Editor",
986 "use_key_equivalents": true,
987 "bindings": {
988 "enter": "menu::Confirm"
989 }
990 },
991 {
992 "context": "CommitEditor > Editor",
993 "use_key_equivalents": true,
994 "bindings": {
995 "escape": "git_panel::FocusChanges",
996 "tab": "git_panel::FocusChanges",
997 "shift-tab": "git_panel::FocusChanges",
998 "enter": "editor::Newline",
999 "ctrl-enter": "git::Commit",
1000 "ctrl-shift-enter": "git::Amend",
1001 "alt-up": "git_panel::FocusChanges",
1002 "alt-l": "git::GenerateCommitMessage"
1003 }
1004 },
1005 {
1006 "context": "DebugPanel",
1007 "use_key_equivalents": true,
1008 "bindings": {
1009 "ctrl-t": "debugger::ToggleThreadPicker",
1010 "ctrl-i": "debugger::ToggleSessionPicker",
1011 "shift-alt-escape": "debugger::ToggleExpandItem"
1012 }
1013 },
1014 {
1015 "context": "VariableList",
1016 "use_key_equivalents": true,
1017 "bindings": {
1018 "left": "variable_list::CollapseSelectedEntry",
1019 "right": "variable_list::ExpandSelectedEntry",
1020 "enter": "variable_list::EditVariable",
1021 "ctrl-c": "variable_list::CopyVariableValue",
1022 "ctrl-alt-c": "variable_list::CopyVariableName",
1023 "delete": "variable_list::RemoveWatch",
1024 "backspace": "variable_list::RemoveWatch",
1025 "alt-enter": "variable_list::AddWatch"
1026 }
1027 },
1028 {
1029 "context": "BreakpointList",
1030 "use_key_equivalents": true,
1031 "bindings": {
1032 "space": "debugger::ToggleEnableBreakpoint",
1033 "backspace": "debugger::UnsetBreakpoint",
1034 "left": "debugger::PreviousBreakpointProperty",
1035 "right": "debugger::NextBreakpointProperty"
1036 }
1037 },
1038 {
1039 "context": "CollabPanel && not_editing",
1040 "use_key_equivalents": true,
1041 "bindings": {
1042 "ctrl-backspace": "collab_panel::Remove",
1043 "space": "menu::Confirm"
1044 }
1045 },
1046 {
1047 "context": "CollabPanel",
1048 "use_key_equivalents": true,
1049 "bindings": {
1050 "alt-up": "collab_panel::MoveChannelUp",
1051 "alt-down": "collab_panel::MoveChannelDown",
1052 "alt-enter": "collab_panel::OpenSelectedChannelNotes"
1053 }
1054 },
1055 {
1056 "context": "(CollabPanel && editing) > Editor",
1057 "use_key_equivalents": true,
1058 "bindings": {
1059 "space": "collab_panel::InsertSpace"
1060 }
1061 },
1062 {
1063 "context": "ChannelModal",
1064 "use_key_equivalents": true,
1065 "bindings": {
1066 "tab": "channel_modal::ToggleMode"
1067 }
1068 },
1069 {
1070 "context": "Picker > Editor",
1071 "use_key_equivalents": true,
1072 "bindings": {
1073 "escape": "menu::Cancel",
1074 "up": "menu::SelectPrevious",
1075 "down": "menu::SelectNext",
1076 "tab": "picker::ConfirmCompletion",
1077 "alt-enter": ["picker::ConfirmInput", { "secondary": false }]
1078 }
1079 },
1080 {
1081 "context": "ChannelModal > Picker > Editor",
1082 "use_key_equivalents": true,
1083 "bindings": {
1084 "tab": "channel_modal::ToggleMode"
1085 }
1086 },
1087 {
1088 "context": "ToolchainSelector",
1089 "use_key_equivalents": true,
1090 "bindings": {
1091 "ctrl-shift-a": "toolchain::AddToolchain"
1092 }
1093 },
1094 {
1095 "context": "FileFinder || (FileFinder > Picker > Editor)",
1096 "use_key_equivalents": true,
1097 "bindings": {
1098 "ctrl-p": "file_finder::Toggle",
1099 "ctrl-shift-a": "file_finder::ToggleSplitMenu",
1100 "ctrl-shift-i": "file_finder::ToggleFilterMenu"
1101 }
1102 },
1103 {
1104 "context": "FileFinder || (FileFinder > Picker > Editor) || (FileFinder > Picker > menu)",
1105 "use_key_equivalents": true,
1106 "bindings": {
1107 "ctrl-shift-p": "file_finder::SelectPrevious",
1108 "ctrl-j": "pane::SplitDown",
1109 "ctrl-k": "pane::SplitUp",
1110 "ctrl-h": "pane::SplitLeft",
1111 "ctrl-l": "pane::SplitRight"
1112 }
1113 },
1114 {
1115 "context": "TabSwitcher",
1116 "use_key_equivalents": true,
1117 "bindings": {
1118 "ctrl-shift-tab": "menu::SelectPrevious",
1119 "ctrl-up": "menu::SelectPrevious",
1120 "ctrl-down": "menu::SelectNext",
1121 "ctrl-backspace": "tab_switcher::CloseSelectedItem"
1122 }
1123 },
1124 {
1125 "context": "StashList || (StashList > Picker > Editor)",
1126 "use_key_equivalents": true,
1127 "bindings": {
1128 "ctrl-shift-backspace": "stash_picker::DropStashItem",
1129 "ctrl-shift-v": "stash_picker::ShowStashItem"
1130 }
1131 },
1132 {
1133 "context": "Terminal",
1134 "use_key_equivalents": true,
1135 "bindings": {
1136 "ctrl-alt-space": "terminal::ShowCharacterPalette",
1137 "ctrl-insert": "terminal::Copy",
1138 "ctrl-shift-c": "terminal::Copy",
1139 "shift-insert": "terminal::Paste",
1140 "ctrl-v": "terminal::Paste",
1141 "ctrl-shift-v": "terminal::Paste",
1142 "ctrl-enter": "assistant::InlineAssist",
1143 "alt-b": ["terminal::SendText", "\u001bb"],
1144 "alt-f": ["terminal::SendText", "\u001bf"],
1145 "alt-.": ["terminal::SendText", "\u001b."],
1146 "ctrl-delete": ["terminal::SendText", "\u001bd"],
1147 "ctrl-n": "workspace::NewTerminal",
1148 // Overrides for conflicting keybindings
1149 "ctrl-b": ["terminal::SendKeystroke", "ctrl-b"],
1150 "ctrl-c": ["terminal::SendKeystroke", "ctrl-c"],
1151 "ctrl-e": ["terminal::SendKeystroke", "ctrl-e"],
1152 "ctrl-o": ["terminal::SendKeystroke", "ctrl-o"],
1153 "ctrl-w": ["terminal::SendKeystroke", "ctrl-w"],
1154 "ctrl-backspace": ["terminal::SendKeystroke", "ctrl-w"],
1155 "ctrl-shift-a": "editor::SelectAll",
1156 "ctrl-shift-f": "buffer_search::Deploy",
1157 "ctrl-shift-l": "terminal::Clear",
1158 "ctrl-shift-w": "pane::CloseActiveItem",
1159 "up": ["terminal::SendKeystroke", "up"],
1160 "pageup": ["terminal::SendKeystroke", "pageup"],
1161 "down": ["terminal::SendKeystroke", "down"],
1162 "pagedown": ["terminal::SendKeystroke", "pagedown"],
1163 "escape": ["terminal::SendKeystroke", "escape"],
1164 "enter": ["terminal::SendKeystroke", "enter"],
1165 "shift-pageup": "terminal::ScrollPageUp",
1166 "shift-pagedown": "terminal::ScrollPageDown",
1167 "shift-up": "terminal::ScrollLineUp",
1168 "shift-down": "terminal::ScrollLineDown",
1169 "shift-home": "terminal::ScrollToTop",
1170 "shift-end": "terminal::ScrollToBottom",
1171 "ctrl-shift-space": "terminal::ToggleViMode",
1172 "ctrl-shift-r": "terminal::RerunTask",
1173 "ctrl-alt-r": "terminal::RerunTask",
1174 "alt-t": "terminal::RerunTask",
1175 "ctrl-shift-5": "pane::SplitRight"
1176 }
1177 },
1178 {
1179 "context": "Terminal && selection",
1180 "bindings": {
1181 "ctrl-c": "terminal::Copy"
1182 }
1183 },
1184 {
1185 "context": "ZedPredictModal",
1186 "use_key_equivalents": true,
1187 "bindings": {
1188 "escape": "menu::Cancel"
1189 }
1190 },
1191 {
1192 "context": "ConfigureContextServerModal > Editor",
1193 "use_key_equivalents": true,
1194 "bindings": {
1195 "escape": "menu::Cancel",
1196 "enter": "editor::Newline",
1197 "ctrl-enter": "menu::Confirm"
1198 }
1199 },
1200 {
1201 "context": "ContextServerToolsModal",
1202 "use_key_equivalents": true,
1203 "bindings": {
1204 "escape": "menu::Cancel"
1205 }
1206 },
1207 {
1208 "context": "OnboardingAiConfigurationModal",
1209 "use_key_equivalents": true,
1210 "bindings": {
1211 "escape": "menu::Cancel"
1212 }
1213 },
1214 {
1215 "context": "Diagnostics",
1216 "use_key_equivalents": true,
1217 "bindings": {
1218 "ctrl-r": "diagnostics::ToggleDiagnosticsRefresh"
1219 }
1220 },
1221 {
1222 "context": "DebugConsole > Editor",
1223 "use_key_equivalents": true,
1224 "bindings": {
1225 "enter": "menu::Confirm",
1226 "alt-enter": "console::WatchExpression"
1227 }
1228 },
1229 {
1230 "context": "RunModal",
1231 "use_key_equivalents": true,
1232 "bindings": {
1233 "ctrl-tab": "pane::ActivateNextItem",
1234 "ctrl-shift-tab": "pane::ActivatePreviousItem"
1235 }
1236 },
1237 {
1238 "context": "MarkdownPreview",
1239 "use_key_equivalents": true,
1240 "bindings": {
1241 "pageup": "markdown::MovePageUp",
1242 "pagedown": "markdown::MovePageDown"
1243 }
1244 },
1245 {
1246 "context": "KeymapEditor",
1247 "use_key_equivalents": true,
1248 "bindings": {
1249 "ctrl-f": "search::FocusSearch",
1250 "alt-f": "keymap_editor::ToggleKeystrokeSearch",
1251 "alt-c": "keymap_editor::ToggleConflictFilter",
1252 "enter": "keymap_editor::EditBinding",
1253 "alt-enter": "keymap_editor::CreateBinding",
1254 "ctrl-c": "keymap_editor::CopyAction",
1255 "ctrl-shift-c": "keymap_editor::CopyContext",
1256 "ctrl-t": "keymap_editor::ShowMatchingKeybinds"
1257 }
1258 },
1259 {
1260 "context": "KeystrokeInput",
1261 "use_key_equivalents": true,
1262 "bindings": {
1263 "enter": "keystroke_input::StartRecording",
1264 "escape escape escape": "keystroke_input::StopRecording",
1265 "delete": "keystroke_input::ClearKeystrokes"
1266 }
1267 },
1268 {
1269 "context": "KeybindEditorModal",
1270 "use_key_equivalents": true,
1271 "bindings": {
1272 "ctrl-enter": "menu::Confirm",
1273 "escape": "menu::Cancel"
1274 }
1275 },
1276 {
1277 "context": "KeybindEditorModal > Editor",
1278 "use_key_equivalents": true,
1279 "bindings": {
1280 "up": "menu::SelectPrevious",
1281 "down": "menu::SelectNext"
1282 }
1283 },
1284 {
1285 "context": "Onboarding",
1286 "use_key_equivalents": true,
1287 "bindings": {
1288 "ctrl-enter": "onboarding::Finish",
1289 "alt-shift-l": "onboarding::SignIn",
1290 "shift-alt-a": "onboarding::OpenAccount"
1291 }
1292 },
1293 {
1294 "context": "GitWorktreeSelector || (GitWorktreeSelector > Picker > Editor)",
1295 "use_key_equivalents": true,
1296 "bindings": {
1297 "ctrl-shift-space": "git::WorktreeFromDefaultOnWindow",
1298 "ctrl-space": "git::WorktreeFromDefault"
1299 }
1300 },
1301 {
1302 "context": "SettingsWindow",
1303 "use_key_equivalents": true,
1304 "bindings": {
1305 "ctrl-w": "workspace::CloseWindow",
1306 "escape": "workspace::CloseWindow",
1307 "ctrl-m": "settings_editor::Minimize",
1308 "ctrl-f": "search::FocusSearch",
1309 "left": "settings_editor::ToggleFocusNav",
1310 "ctrl-shift-e": "settings_editor::ToggleFocusNav",
1311 // todo(settings_ui): cut this down based on the max files and overflow UI
1312 "ctrl-1": ["settings_editor::FocusFile", 0],
1313 "ctrl-2": ["settings_editor::FocusFile", 1],
1314 "ctrl-3": ["settings_editor::FocusFile", 2],
1315 "ctrl-4": ["settings_editor::FocusFile", 3],
1316 "ctrl-5": ["settings_editor::FocusFile", 4],
1317 "ctrl-6": ["settings_editor::FocusFile", 5],
1318 "ctrl-7": ["settings_editor::FocusFile", 6],
1319 "ctrl-8": ["settings_editor::FocusFile", 7],
1320 "ctrl-9": ["settings_editor::FocusFile", 8],
1321 "ctrl-0": ["settings_editor::FocusFile", 9],
1322 "ctrl-pageup": "settings_editor::FocusPreviousFile",
1323 "ctrl-pagedown": "settings_editor::FocusNextFile"
1324 }
1325 },
1326 {
1327 "context": "StashDiff > Editor",
1328 "use_key_equivalents": true,
1329 "bindings": {
1330 "ctrl-space": "git::ApplyCurrentStash",
1331 "ctrl-shift-space": "git::PopCurrentStash",
1332 "ctrl-shift-backspace": "git::DropCurrentStash"
1333 }
1334 },
1335 {
1336 "context": "SettingsWindow > NavigationMenu",
1337 "use_key_equivalents": true,
1338 "bindings": {
1339 "up": "settings_editor::FocusPreviousNavEntry",
1340 "shift-tab": "settings_editor::FocusPreviousNavEntry",
1341 "down": "settings_editor::FocusNextNavEntry",
1342 "tab": "settings_editor::FocusNextNavEntry",
1343 "right": "settings_editor::ExpandNavEntry",
1344 "left": "settings_editor::CollapseNavEntry",
1345 "pageup": "settings_editor::FocusPreviousRootNavEntry",
1346 "pagedown": "settings_editor::FocusNextRootNavEntry",
1347 "home": "settings_editor::FocusFirstNavEntry",
1348 "end": "settings_editor::FocusLastNavEntry"
1349 }
1350 },
1351 {
1352 "context": "Zeta2Feedback > Editor",
1353 "bindings": {
1354 "enter": "editor::Newline",
1355 "ctrl-enter up": "dev::Zeta2RatePredictionPositive",
1356 "ctrl-enter down": "dev::Zeta2RatePredictionNegative"
1357 }
1358 },
1359 {
1360 "context": "Zeta2Context > Editor",
1361 "bindings": {
1362 "alt-left": "dev::Zeta2ContextGoBack",
1363 "alt-right": "dev::Zeta2ContextGoForward"
1364 }
1365 }
1366]