Last active
June 29, 2025 14:08
-
-
Save artagnon/b3959890ba5fb8ca97b4f81fee42bf54 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // Zed keymap | |
| // | |
| // For information on binding keys, see the Zed | |
| // documentation: https://zed.dev/docs/key-bindings | |
| // | |
| // To see the default key bindings run `zed: open default keymap` | |
| // from the command palette. | |
| [ | |
| // Standard Linux bindings disable | |
| { | |
| "bindings": { | |
| "home": null, | |
| "shift-pageup": null, | |
| "pageup": null, | |
| "end": null, | |
| "shift-pagedown": null, | |
| "pagedown": null, | |
| "ctrl-n": null, | |
| "tab": null, | |
| "down": null, | |
| "ctrl-p": null, | |
| "shift-tab": null, | |
| "up": null, | |
| "enter": null, | |
| "ctrl-enter": null, | |
| "ctrl-escape": null, | |
| "ctrl-c": null, | |
| "escape": null, | |
| "alt-shift-enter": null, | |
| "alt-enter": null, | |
| "ctrl-alt-enter": null, | |
| "ctrl-shift-w": null, | |
| "shift-escape": null, | |
| "open": null, | |
| "ctrl-o": null, | |
| "ctrl-=": null, | |
| "ctrl-+": null, | |
| "ctrl--": null, | |
| "ctrl-0": null, | |
| "ctrl-,": null, | |
| "ctrl-q": null, | |
| "f4": null, | |
| "shift-f5": null, | |
| "ctrl-shift-f5": null, | |
| "f6": null, | |
| "f7": null, | |
| "ctrl-f11": null, | |
| "shift-f11": null, | |
| "f11": null, | |
| "ctrl-alt-z": null, | |
| "ctrl-shift-i": null, | |
| "ctrl-alt-l": null | |
| } | |
| }, | |
| { | |
| "context": "Picker || menu", | |
| "bindings": { | |
| "up": null, | |
| "down": null | |
| } | |
| }, | |
| { | |
| "context": "Editor", | |
| "bindings": { | |
| "escape": null, | |
| "shift-backspace": null, | |
| "backspace": null, | |
| "delete": null, | |
| "tab": null, | |
| "shift-tab": null, | |
| "ctrl-k": null, | |
| "ctrl-k ctrl-q": null, | |
| "ctrl-k q": null, | |
| "ctrl-backspace": null, | |
| "ctrl-delete": null, | |
| "cut": null, | |
| "shift-delete": null, | |
| "ctrl-x": null, | |
| "copy": null, | |
| "ctrl-insert": null, | |
| "ctrl-c": null, | |
| "paste": null, | |
| "shift-insert": null, | |
| "ctrl-v": null, | |
| "undo": null, | |
| "ctrl-z": null, | |
| "redo": null, | |
| "ctrl-y": null, | |
| "ctrl-shift-z": null, | |
| "up": null, | |
| "ctrl-up": null, | |
| "ctrl-down": null, | |
| "pageup": null, | |
| "alt-pageup": null, | |
| "shift-pageup": null, | |
| "home": null, | |
| "down": null, | |
| "pagedown": null, | |
| "alt-pagedown": null, | |
| "shift-pagedown": null, | |
| "end": null, | |
| "left": null, | |
| "right": null, | |
| "ctrl-left": null, | |
| "ctrl-right": null, | |
| "ctrl-home": null, | |
| "ctrl-end": null, | |
| "shift-up": null, | |
| "shift-down": null, | |
| "shift-left": null, | |
| "shift-right": null, | |
| "ctrl-shift-left": null, | |
| "ctrl-shift-right": null, | |
| "ctrl-shift-home": null, | |
| "ctrl-shift-end": null, | |
| "ctrl-a": null, | |
| "ctrl-l": null, | |
| "ctrl-shift-i": null, | |
| "alt-shift-o": null, | |
| "shift-home": null, | |
| "shift-end": null, | |
| "ctrl-alt-space": null, | |
| "ctrl-;": null, | |
| "ctrl-'": null, | |
| "ctrl-\"": null, | |
| "ctrl-i": null, | |
| "alt-g b": null, | |
| "alt-g m": null, | |
| "menu": null, | |
| "shift-f10": null, | |
| "ctrl-shift-e": null, | |
| "f9": null, | |
| "shift-f9": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && mode == full", | |
| "bindings": { | |
| "shift-enter": null, | |
| "enter": null, | |
| "ctrl-enter": null, | |
| "ctrl-shift-enter": null, | |
| "ctrl-k ctrl-z": null, | |
| "ctrl-k z": null, | |
| "find": null, | |
| "ctrl-f": null, | |
| "ctrl-h": null, | |
| "ctrl->": null, | |
| "ctrl-<": null, | |
| "ctrl-alt-e": null, | |
| "ctrl-shift-backspace": null, | |
| "ctrl-shift-alt-backspace": null, | |
| "alt-enter": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && mode == full && edit_prediction", | |
| "bindings": { | |
| "alt-]": null, | |
| "alt-[": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && !edit_prediction", | |
| "bindings": { | |
| "alt-\\": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && mode == auto_height", | |
| "bindings": { | |
| "ctrl-enter": null, | |
| "shift-enter": null, | |
| "ctrl-shift-enter": null | |
| } | |
| }, | |
| { | |
| "context": "Markdown", | |
| "bindings": { | |
| "copy": null, | |
| "ctrl-c": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && jupyter && !ContextEditor", | |
| "bindings": { | |
| "ctrl-shift-enter": null, | |
| "ctrl-alt-enter": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && !agent_diff", | |
| "bindings": { | |
| "ctrl-k ctrl-r": null, | |
| "ctrl-alt-y": null, | |
| "alt-y": null, | |
| "alt-shift-y": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && editor_agent_diff", | |
| "bindings": { | |
| "ctrl-y": null, | |
| "ctrl-n": null, | |
| "ctrl-shift-y": null, | |
| "ctrl-shift-n": null, | |
| "shift-ctrl-r": null | |
| } | |
| }, | |
| { | |
| "context": "AgentDiff", | |
| "bindings": { | |
| "ctrl-y": null, | |
| "ctrl-n": null, | |
| "ctrl-shift-y": null, | |
| "ctrl-shift-n": null | |
| } | |
| }, | |
| { | |
| "context": "ContextEditor > Editor", | |
| "bindings": { | |
| "ctrl-enter": null, | |
| "ctrl-n": null, | |
| "ctrl-shift-y": null, | |
| "ctrl-shift-n": null | |
| } | |
| }, | |
| { | |
| "context": "ContextEditor > Editor", | |
| "bindings": { | |
| "ctrl-enter": null, | |
| "ctrl-n": null, | |
| "ctrl-shift-y": null, | |
| "ctrl-shift-n": null | |
| } | |
| }, | |
| { | |
| "context": "AgentPanel", | |
| "bindings": { | |
| "ctrl-n": null, | |
| "ctrl-alt-n": null, | |
| "ctrl-shift-h": null, | |
| "ctrl-alt-c": null, | |
| "ctrl-alt-p": null, | |
| "ctrl-i": null, | |
| "ctrl-alt-/": null, | |
| "ctrl-shift-a": null, | |
| "ctrl-shift-j": null, | |
| "ctrl-shift-i": null, | |
| "shift-alt-escape": null, | |
| "ctrl->": null, | |
| "ctrl-alt-e": null, | |
| "ctrl-shift-e": null, | |
| "ctrl-shift-enter": null, | |
| "super-ctrl-b": null, | |
| "alt-enter": null | |
| } | |
| }, | |
| { | |
| "context": "AgentPanel > NavigationMenu", | |
| "bindings": { | |
| "shift-backspace": null | |
| } | |
| }, | |
| { | |
| "context": "AgentPanel > Markdown", | |
| "bindings": { | |
| "copy": null, | |
| "ctrl-c": null | |
| } | |
| }, | |
| { | |
| "context": "AgentPanel && prompt_editor", | |
| "bindings": { | |
| "ctrl-n": null, | |
| "ctrl-alt-t": null | |
| } | |
| }, | |
| { | |
| "context": "MessageEditor > Editor", | |
| "bindings": { | |
| "enter": null, | |
| "ctrl-enter": null, | |
| "ctrl-i": null, | |
| "shift-ctrl-r": null, | |
| "ctrl-shift-y": null, | |
| "ctrl-shift-n": null | |
| } | |
| }, | |
| { | |
| "context": "EditMessageEditor > Editor", | |
| "bindings": { | |
| "escape": null, | |
| "enter": null, | |
| "alt-enter": null | |
| } | |
| }, | |
| { | |
| "context": "AgentFeedbackMessageEditor > Editor", | |
| "bindings": { | |
| "escape": null, | |
| "enter": null, | |
| "alt-enter": null | |
| } | |
| }, | |
| { | |
| "context": "ContextStrip", | |
| "bindings": { | |
| "up": null, | |
| "right": null, | |
| "left": null, | |
| "down": null, | |
| "backspace": null, | |
| "enter": null | |
| } | |
| }, | |
| { | |
| "context": "ThreadHistory", | |
| "bindings": { | |
| "backspace": null | |
| } | |
| }, | |
| { | |
| "context": "PromptLibrary", | |
| "bindings": { | |
| "new": null, | |
| "ctrl-n": null, | |
| "ctrl-shift-s": null | |
| } | |
| }, | |
| { | |
| "context": "BufferSearchBar", | |
| "bindings": { | |
| "escape": null, | |
| "tab": null, | |
| "enter": null, | |
| "shift-enter": null, | |
| "alt-enter": null, | |
| "find": null, | |
| "ctrl-f": null, | |
| "ctrl-h": null, | |
| "ctrl-l": null | |
| } | |
| }, | |
| { | |
| "context": "BufferSearchBar && in_replace > Editor", | |
| "bindings": { | |
| "enter": null, | |
| "ctrl-enter": null | |
| } | |
| }, | |
| { | |
| "context": "BufferSearchBar && !in_replace > Editor", | |
| "bindings": { | |
| "up": null, | |
| "down": null | |
| } | |
| }, | |
| { | |
| "context": "ProjectSearchBar", | |
| "bindings": { | |
| "escape": null, | |
| "shift-find": null, | |
| "ctrl-shift-f": null, | |
| "ctrl-shift-h": null, | |
| "alt-ctrl-g": null, | |
| "alt-ctrl-x": null | |
| } | |
| }, | |
| { | |
| "context": "ProjectSearchBar > Editor", | |
| "bindings": { | |
| "up": null, | |
| "down": null | |
| } | |
| }, | |
| { | |
| "context": "ProjectSearchBar && in_replace > Editor", | |
| "bindings": { | |
| "enter": null, | |
| "ctrl-alt-enter": null | |
| } | |
| }, | |
| { | |
| "context": "ProjectSearchView", | |
| "bindings": { | |
| "escape": null, | |
| "ctrl-shift-h": null, | |
| "alt-ctrl-g": null, | |
| "alt-ctrl-x": null | |
| } | |
| }, | |
| { | |
| "context": "Pane", | |
| "bindings": { | |
| "alt-1": null, | |
| "alt-2": null, | |
| "alt-3": null, | |
| "alt-4": null, | |
| "alt-5": null, | |
| "alt-6": null, | |
| "alt-7": null, | |
| "alt-8": null, | |
| "alt-9": null, | |
| "alt-0": null, | |
| "ctrl-pageup": null, | |
| "ctrl-pagedown": null, | |
| "ctrl-shift-pageup": null, | |
| "ctrl-shift-pagedown": null, | |
| "ctrl-f4": null, | |
| "ctrl-w": null, | |
| "alt-ctrl-t": null, | |
| "alt-ctrl-shift-w": null, | |
| "ctrl-k e": null, | |
| "ctrl-k t": null, | |
| "ctrl-k u": null, | |
| "ctrl-k w": null, | |
| "ctrl-k ctrl-w": null, | |
| "back": null, | |
| "ctrl-alt--": null, | |
| "ctrl-alt-_": null, | |
| "forward": null, | |
| "ctrl-alt-g": null, | |
| "f3": null, | |
| "ctrl-alt-shift-g": null, | |
| "shift-f3": null, | |
| "shift-find": null, | |
| "ctrl-shift-f": null, | |
| "ctrl-alt-shift-h": null, | |
| "ctrl-alt-shift-l": null, | |
| "alt-enter": null, | |
| "alt-c": null, | |
| "alt-w": null, | |
| "alt-find": null, | |
| "alt-ctrl-f": null, | |
| "ctrl-alt-shift-r": null, | |
| "ctrl-alt-shift-x": null, | |
| "alt-r": null, | |
| "ctrl-k shift-enter": null | |
| } | |
| }, | |
| // Bindings from VS Code | |
| { | |
| "context": "Editor", | |
| "bindings": { | |
| "ctrl-[": null, | |
| "ctrl-]": null, | |
| "shift-alt-up": null, | |
| "shift-alt-down": null, | |
| "ctrl-shift-k": null, | |
| "alt-up": null, | |
| "alt-down": null, | |
| "ctrl-alt-shift-up": null, | |
| "ctrl-alt-shift-down": null, | |
| "alt-shift-right": null, | |
| "alt-shift-left": null, | |
| "ctrl-shift-l": null, | |
| "ctrl-f2": null, | |
| "ctrl-d": null, | |
| "ctrl-shift-down": null, | |
| "ctrl-shift-up": null, | |
| "ctrl-k ctrl-d": null, | |
| "ctrl-k ctrl-shift-d": null, | |
| "ctrl-k ctrl-i": null, | |
| "ctrl-/": null, | |
| "ctrl-u": null, | |
| "ctrl-shift-u": null, | |
| "f8": null, | |
| "shift-f8": null, | |
| "f2": null, | |
| "f12": null, | |
| "alt-f12": null, | |
| "ctrl-shift-f10": null, | |
| "ctrl-f12": null, | |
| "shift-f12": null, | |
| "alt-ctrl-f12": null, | |
| "alt-shift-f12": null, | |
| "ctrl-m": null, | |
| "ctrl-|": null, | |
| "ctrl-{": null, | |
| "ctrl-}": null, | |
| "ctrl-k ctrl-l": null, | |
| "ctrl-k ctrl-[": null, | |
| "ctrl-k ctrl-]": null, | |
| "ctrl-k ctrl-1": null, | |
| "ctrl-k ctrl-2": null, | |
| "ctrl-k ctrl-3": null, | |
| "ctrl-k ctrl-4": null, | |
| "ctrl-k ctrl-5": null, | |
| "ctrl-k ctrl-6": null, | |
| "ctrl-k ctrl-7": null, | |
| "ctrl-k ctrl-8": null, | |
| "ctrl-k ctrl-9": null, | |
| "ctrl-k ctrl-0": null, | |
| "ctrl-k ctrl-j": null, | |
| "ctrl-space": null, | |
| "ctrl-shift-space": null, | |
| "ctrl-.": null, | |
| "ctrl-k r": null, | |
| "ctrl-k p": null, | |
| "ctrl-\\": null, | |
| "ctrl-alt-shift-c": null, | |
| "alt-.": null, | |
| "alt-,": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && extension == md", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-k v": null, | |
| "ctrl-shift-v": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && extension == svg", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-k v": null, | |
| "ctrl-shift-v": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && mode == full", | |
| "bindings": { | |
| "ctrl-shift-o": null, | |
| "ctrl-g": null | |
| } | |
| }, | |
| { | |
| "context": "Workspace", | |
| "bindings": { | |
| "alt-open": null, | |
| "alt-shift-open": null, | |
| "alt-ctrl-open": null, | |
| "alt-ctrl-shift-open": null, | |
| "alt-ctrl-shift-b": null, | |
| "alt-shift-enter": null, | |
| "ctrl-~": null, | |
| "save": null, | |
| "ctrl-s": null, | |
| "ctrl-k s": null, | |
| "shift-save": null, | |
| "ctrl-shift-s": null, | |
| "new": null, | |
| "ctrl-n": null, | |
| "shift-new": null, | |
| "ctrl-shift-n": null, | |
| "ctrl-`": null, | |
| "f10": null, | |
| "alt-1": null, | |
| "alt-2": null, | |
| "alt-3": null, | |
| "alt-4": null, | |
| "alt-5": null, | |
| "alt-6": null, | |
| "alt-7": null, | |
| "alt-8": null, | |
| "alt-9": null, | |
| "ctrl-alt-b": null, | |
| "ctrl-b": null, | |
| "ctrl-j": null, | |
| "ctrl-alt-y": null, | |
| "shift-find": null, | |
| "ctrl-shift-f": null, | |
| "ctrl-shift-h": null, | |
| "ctrl-shift-t": null, | |
| "ctrl-k ctrl-s": null, | |
| "ctrl-k ctrl-t": null, | |
| "ctrl-t": null, | |
| "ctrl-p": null, | |
| "ctrl-tab": null, | |
| "ctrl-shift-tab": null, | |
| "ctrl-e": null, | |
| "f1": null, | |
| "ctrl-shift-p": null, | |
| "ctrl-shift-m": null, | |
| "ctrl-shift-e": null, | |
| "ctrl-shift-b": null, | |
| "ctrl-shift-g": null, | |
| "ctrl-shift-d": null, | |
| "ctrl-?": null, | |
| "alt-save": null, | |
| "ctrl-alt-s": null, | |
| "ctrl-k m": null, | |
| "escape": null, | |
| "ctrl-k ctrl-left": null, | |
| "ctrl-k ctrl-right": null, | |
| "ctrl-k ctrl-up": null, | |
| "ctrl-k ctrl-down": null, | |
| "ctrl-k shift-left": null, | |
| "ctrl-k shift-right": null, | |
| "ctrl-k shift-up": null, | |
| "ctrl-k shift-down": null, | |
| "ctrl-shift-x": null, | |
| "ctrl-shift-r": null, | |
| "ctrl-alt-r": null, | |
| "alt-t": null, | |
| "alt-shift-t": null, | |
| "alt-shift-r": null, | |
| // also possible to spawn tasks by name: | |
| // "foo-bar": ["task::Spawn", { "task_name": "MyTask", "reveal_target": "dock" }] | |
| // or by tag: | |
| // "foo-bar": ["task::Spawn", { "task_tag": "MyTag" }], | |
| "f5": null | |
| } | |
| }, | |
| { | |
| "context": "Workspace && debugger_running", | |
| "bindings": { | |
| "f5": null | |
| } | |
| }, | |
| { | |
| "context": "Workspace && debugger_stopped", | |
| "bindings": { | |
| "f5": null | |
| } | |
| }, | |
| { | |
| "context": "ApplicationMenu", | |
| "bindings": { | |
| "f10": null, | |
| "left": null, | |
| "right": null | |
| } | |
| }, | |
| // Bindings from Sublime Text | |
| { | |
| "context": "Editor", | |
| "bindings": { | |
| "ctrl-shift-j": null, | |
| "ctrl-alt-backspace": null, | |
| "ctrl-alt-h": null, | |
| "ctrl-alt-delete": null, | |
| "ctrl-alt-d": null, | |
| "ctrl-alt-left": null, | |
| "ctrl-alt-right": null, | |
| "ctrl-alt-shift-left": null, | |
| "ctrl-alt-shift-b": null, | |
| "ctrl-alt-shift-right": null, | |
| "ctrl-alt-shift-f": null | |
| } | |
| }, | |
| // Bindings from Atom | |
| { | |
| "context": "Pane", | |
| "bindings": { | |
| "ctrl-k up": null, | |
| "ctrl-k down": null, | |
| "ctrl-k left": null, | |
| "ctrl-k right": null | |
| } | |
| }, | |
| // Bindings that should be unified with bindings for more general actions | |
| { | |
| "context": "Editor && renaming", | |
| "bindings": { | |
| "enter": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && showing_completions", | |
| "bindings": { | |
| "enter": null, | |
| "shift-enter": null, | |
| "tab": null | |
| } | |
| }, | |
| // Bindings for accepting edit predictions | |
| // | |
| // alt-l is provided as an alternative to tab/alt-tab. and will be displayed in the UI. This is | |
| // because alt-tab may not be available, as it is often used for window switching. | |
| { | |
| "context": "Editor && edit_prediction", | |
| "bindings": { | |
| "alt-tab": null, | |
| "alt-l": null, | |
| "tab": null, | |
| "alt-right": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && edit_prediction_conflict", | |
| "bindings": { | |
| "alt-tab": null, | |
| "alt-l": null, | |
| "tab": null, | |
| "alt-right": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && showing_code_actions", | |
| "bindings": { | |
| "enter": null | |
| } | |
| }, | |
| { | |
| "context": "Editor && (showing_code_actions || showing_completions)", | |
| "bindings": { | |
| "ctrl-p": null, | |
| "up": null, | |
| "ctrl-n": null, | |
| "down": null, | |
| "pageup": null, | |
| "pagedown": null | |
| } | |
| }, | |
| // Custom bindings | |
| { | |
| "bindings": { | |
| "ctrl-alt-shift-f": null, | |
| // Only available in debug builds: opens an element inspector for development. | |
| "ctrl-alt-i": null | |
| } | |
| }, | |
| { | |
| "context": "!Terminal", | |
| "bindings": { | |
| "ctrl-shift-c": null | |
| } | |
| }, | |
| { | |
| "context": "!ContextEditor > Editor && mode == full", | |
| "bindings": { | |
| "alt-enter": null, | |
| "shift-enter": null, | |
| "ctrl-alt-enter": null, | |
| "ctrl-shift-e": null, | |
| "ctrl-f8": null, | |
| "ctrl-shift-f8": null, | |
| "ctrl-enter": null, | |
| "ctrl-:": null | |
| } | |
| }, | |
| { | |
| "context": "PromptEditor", | |
| "bindings": { | |
| "ctrl-[": null, | |
| "ctrl-]": null, | |
| "ctrl-alt-e": null | |
| } | |
| }, | |
| { | |
| "context": "Prompt", | |
| "bindings": { | |
| "left": null, | |
| "right": null, | |
| "h": null, | |
| "l": null | |
| } | |
| }, | |
| { | |
| "context": "ProjectSearchBar && !in_replace", | |
| "bindings": { | |
| "ctrl-enter": null | |
| } | |
| }, | |
| { | |
| "context": "OutlinePanel && not_editing", | |
| "bindings": { | |
| "escape": null, | |
| "left": null, | |
| "right": null, | |
| "alt-copy": null, | |
| "ctrl-alt-c": null, | |
| "alt-shift-copy": null, | |
| "alt-ctrl-shift-c": null, | |
| "alt-ctrl-r": null, | |
| "space": null, | |
| "shift-down": null, | |
| "shift-up": null, | |
| "alt-enter": null, | |
| "ctrl-alt-enter": null | |
| } | |
| }, | |
| { | |
| "context": "ProjectPanel", | |
| "bindings": { | |
| "left": null, | |
| "right": null, | |
| "new": null, | |
| "ctrl-n": null, | |
| "alt-new": null, | |
| "alt-ctrl-n": null, | |
| "cut": null, | |
| "ctrl-x": null, | |
| "copy": null, | |
| "ctrl-insert": null, | |
| "ctrl-c": null, | |
| "paste": null, | |
| "shift-insert": null, | |
| "ctrl-v": null, | |
| "alt-copy": null, | |
| "ctrl-alt-c": null, | |
| "alt-shift-copy": null, | |
| "alt-ctrl-shift-c": null, | |
| "enter": null, | |
| "f2": null, | |
| "backspace": null, | |
| "delete": null, | |
| "shift-delete": null, | |
| "ctrl-backspace": null, | |
| "ctrl-delete": null, | |
| "alt-ctrl-r": null, | |
| "ctrl-shift-enter": null, | |
| "shift-find": null, | |
| "ctrl-alt-shift-f": null, | |
| "shift-down": null, | |
| "shift-up": null, | |
| "escape": null | |
| } | |
| }, | |
| { | |
| "context": "ProjectPanel && not_editing", | |
| "bindings": { | |
| "space": "project_panel::Open" | |
| } | |
| }, | |
| { | |
| "context": "GitPanel && ChangesList", | |
| "bindings": { | |
| "up": null, | |
| "down": null, | |
| "enter": null, | |
| "alt-y": null, | |
| "alt-shift-y": null, | |
| "ctrl-alt-y": null, | |
| "space": null, | |
| "tab": null, | |
| "shift-tab": null, | |
| "escape": null, | |
| "ctrl-enter": null, | |
| "ctrl-shift-enter": null, | |
| "alt-enter": null, | |
| "delete": null, | |
| "backspace": null, | |
| "shift-delete": null, | |
| "ctrl-backspace": null, | |
| "ctrl-delete": null | |
| } | |
| }, | |
| { | |
| "context": "GitPanel && CommitEditor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": null | |
| } | |
| }, | |
| { | |
| "context": "GitCommit > Editor", | |
| "bindings": { | |
| "escape": null, | |
| "enter": null, | |
| "ctrl-enter": null, | |
| "ctrl-shift-enter": null, | |
| "alt-l": null | |
| } | |
| }, | |
| { | |
| "context": "GitPanel", | |
| "bindings": { | |
| "ctrl-g ctrl-g": null, | |
| "ctrl-g up": null, | |
| "ctrl-g down": null, | |
| "ctrl-g shift-up": null, | |
| "ctrl-g d": null, | |
| "ctrl-g backspace": null, | |
| "ctrl-g shift-backspace": null, | |
| "ctrl-space": null, | |
| "ctrl-shift-space": null | |
| } | |
| }, | |
| { | |
| "context": "GitDiff > Editor", | |
| "bindings": { | |
| "ctrl-enter": null, | |
| "ctrl-shift-enter": null, | |
| "ctrl-space": null, | |
| "ctrl-shift-space": null | |
| } | |
| }, | |
| { | |
| "context": "AskPass > Editor", | |
| "bindings": { | |
| "enter": null | |
| } | |
| }, | |
| { | |
| "context": "GitPanel > Editor", | |
| "bindings": { | |
| "escape": null, | |
| "tab": null, | |
| "shift-tab": null, | |
| "enter": null, | |
| "ctrl-enter": null, | |
| "ctrl-shift-enter": null, | |
| "alt-up": null, | |
| "alt-l": null | |
| } | |
| }, | |
| { | |
| "context": "DebugPanel", | |
| "bindings": { | |
| "ctrl-t": null, | |
| "ctrl-i": null, | |
| "shift-alt-escape": null | |
| } | |
| }, | |
| { | |
| "context": "VariableList", | |
| "bindings": { | |
| "left": null, | |
| "right": null, | |
| "enter": null, | |
| "ctrl-c": null, | |
| "ctrl-alt-c": null, | |
| "delete": null, | |
| "backspace": null, | |
| "alt-enter": null | |
| } | |
| }, | |
| { | |
| "context": "BreakpointList", | |
| "bindings": { | |
| "space": null, | |
| "backspace": null | |
| } | |
| }, | |
| { | |
| "context": "CollabPanel && not_editing", | |
| "bindings": { | |
| "ctrl-backspace": null, | |
| "space": null, | |
| "ctrl-up": null, | |
| "ctrl-down": null | |
| } | |
| }, | |
| { | |
| "context": "(CollabPanel && editing) > Editor", | |
| "bindings": { | |
| "space": null | |
| } | |
| }, | |
| { | |
| "context": "ChannelModal", | |
| "bindings": { | |
| "tab": null | |
| } | |
| }, | |
| { | |
| "context": "Picker > Editor", | |
| "bindings": { | |
| "escape": null, | |
| "up": null, | |
| "down": null, | |
| "tab": null, | |
| "alt-enter": null | |
| } | |
| }, | |
| { | |
| "context": "ChannelModal > Picker > Editor", | |
| "bindings": { | |
| "tab": null | |
| } | |
| }, | |
| { | |
| "context": "FileFinder || (FileFinder > Picker > Editor)", | |
| "bindings": { | |
| "ctrl-shift-a": null, | |
| "ctrl-shift-i": null | |
| } | |
| }, | |
| { | |
| "context": "FileFinder || (FileFinder > Picker > Editor) || (FileFinder > Picker > menu)", | |
| "bindings": { | |
| "ctrl-shift-p": null, | |
| "ctrl-j": null, | |
| "ctrl-k": null, | |
| "ctrl-h": null, | |
| "ctrl-l": null | |
| } | |
| }, | |
| { | |
| "context": "TabSwitcher", | |
| "bindings": { | |
| "ctrl-shift-tab": null, | |
| "ctrl-up": null, | |
| "ctrl-down": null, | |
| "ctrl-backspace": null | |
| } | |
| }, | |
| { | |
| "context": "Terminal", | |
| "bindings": { | |
| "ctrl-alt-space": null, | |
| "copy": null, | |
| "ctrl-insert": null, | |
| "ctrl-shift-c": null, | |
| "paste": null, | |
| "shift-insert": null, | |
| "ctrl-shift-v": null, | |
| "ctrl-enter": null, | |
| "alt-b": null, | |
| "alt-f": null, | |
| "alt-.": null, | |
| "ctrl-delete": null, | |
| // Overrides for conflicting keybindings | |
| "ctrl-b": null, | |
| "ctrl-c": null, | |
| "ctrl-e": null, | |
| "ctrl-o": null, | |
| "ctrl-w": null, | |
| "ctrl-backspace": null, | |
| "ctrl-shift-a": null, | |
| "find": null, | |
| "ctrl-shift-f": null, | |
| "ctrl-shift-l": null, | |
| "ctrl-shift-w": null, | |
| "up": null, | |
| "pageup": null, | |
| "down": null, | |
| "pagedown": null, | |
| "escape": null, | |
| "enter": null, | |
| "shift-pageup": null, | |
| "shift-pagedown": null, | |
| "shift-up": null, | |
| "shift-down": null, | |
| "shift-home": null, | |
| "shift-end": null, | |
| "ctrl-shift-space": null, | |
| "ctrl-shift-r": null, | |
| "ctrl-alt-r": null, | |
| "alt-t": null | |
| } | |
| }, | |
| { | |
| "context": "ZedPredictModal", | |
| "bindings": { | |
| "escape": null | |
| } | |
| }, | |
| { | |
| "context": "ConfigureContextServerModal > Editor", | |
| "bindings": { | |
| "escape": null, | |
| "enter": null, | |
| "ctrl-enter": null | |
| } | |
| }, | |
| { | |
| "context": "Diagnostics", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-r": null | |
| } | |
| }, | |
| { | |
| "context": "DebugConsole > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "enter": null, | |
| "alt-enter": null | |
| } | |
| }, | |
| { | |
| "context": "RunModal", | |
| "bindings": { | |
| "ctrl-tab": null, | |
| "ctrl-shift-tab": null | |
| } | |
| }, | |
| // Standard macOS bindings | |
| { | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "f4": "debugger::Start", | |
| "shift-f5": "debugger::Stop", | |
| "shift-cmd-f5": "debugger::Restart", | |
| "f6": "debugger::Pause", | |
| "f7": "debugger::StepOver", | |
| "f11": "debugger::StepInto", | |
| "shift-f11": "debugger::StepOut", | |
| "home": "menu::SelectFirst", | |
| "shift-pageup": "menu::SelectFirst", | |
| "pageup": "menu::SelectFirst", | |
| "cmd-up": "menu::SelectFirst", | |
| "end": "menu::SelectLast", | |
| "shift-pagedown": "menu::SelectLast", | |
| "pagedown": "menu::SelectLast", | |
| "cmd-down": "menu::SelectLast", | |
| "tab": "menu::SelectNext", | |
| "ctrl-n": "menu::SelectNext", | |
| "down": "menu::SelectNext", | |
| "shift-tab": "menu::SelectPrevious", | |
| "ctrl-p": "menu::SelectPrevious", | |
| "up": "menu::SelectPrevious", | |
| "enter": "menu::Confirm", | |
| "ctrl-enter": "menu::SecondaryConfirm", | |
| "cmd-enter": "menu::SecondaryConfirm", | |
| "cmd-escape": "menu::Cancel", | |
| "ctrl-escape": "menu::Cancel", | |
| "ctrl-c": "menu::Cancel", | |
| "escape": "menu::Cancel", | |
| "alt-shift-enter": "menu::Restart", | |
| "cmd-shift-w": "workspace::CloseWindow", | |
| "shift-escape": "workspace::ToggleZoom", | |
| // This cannot be changed on Linux. | |
| "ctrl-o": "workspace::Open", | |
| "cmd-=": ["zed::IncreaseBufferFontSize", { "persist": false }], | |
| "cmd-+": ["zed::IncreaseBufferFontSize", { "persist": false }], | |
| "cmd--": ["zed::DecreaseBufferFontSize", { "persist": false }], | |
| "cmd-0": ["zed::ResetBufferFontSize", { "persist": false }], | |
| "cmd-,": "zed::OpenSettings", | |
| "cmd-q": "zed::Quit", | |
| "cmd-h": "zed::Hide", | |
| "alt-cmd-h": "zed::HideOthers", | |
| "cmd-m": "zed::Minimize", | |
| "fn-f": "zed::ToggleFullScreen", | |
| "ctrl-cmd-f": "zed::ToggleFullScreen", | |
| "ctrl-cmd-z": "edit_prediction::RateCompletions", | |
| "ctrl-cmd-i": "edit_prediction::ToggleMenu", | |
| "ctrl-cmd-l": "lsp_tool::ToggleMenu" | |
| } | |
| }, | |
| { | |
| "context": "Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": "editor::Cancel", | |
| "shift-backspace": "editor::Backspace", | |
| "ctrl-h": "editor::Backspace", | |
| "backspace": "editor::Backspace", | |
| "ctrl-d": "editor::Delete", | |
| "delete": "editor::Delete", | |
| "tab": "editor::Tab", | |
| "shift-tab": "editor::Backtab", | |
| "ctrl-t": "editor::Transpose", | |
| "ctrl-k": "editor::KillRingCut", | |
| "ctrl-y": "editor::KillRingYank", | |
| "cmd-k cmd-q": "editor::Rewrap", | |
| "cmd-k q": "editor::Rewrap", | |
| "cmd-backspace": "editor::DeleteToBeginningOfLine", | |
| "cmd-delete": "editor::DeleteToEndOfLine", | |
| "alt-backspace": "editor::DeleteToPreviousWordStart", | |
| "ctrl-w": "editor::DeleteToPreviousWordStart", | |
| "alt-delete": "editor::DeleteToNextWordEnd", | |
| "cmd-x": "editor::Cut", | |
| "cmd-c": "editor::Copy", | |
| "cmd-v": "editor::Paste", | |
| "cmd-z": "editor::Undo", | |
| "cmd-shift-z": "editor::Redo", | |
| "up": "editor::MoveUp", | |
| "ctrl-up": "editor::MoveToStartOfParagraph", | |
| "pageup": "editor::MovePageUp", | |
| "shift-pageup": "editor::SelectPageUp", | |
| "cmd-pageup": "editor::PageUp", | |
| "ctrl-pageup": "editor::LineUp", | |
| "down": "editor::MoveDown", | |
| "ctrl-down": "editor::MoveToEndOfParagraph", | |
| "pagedown": "editor::MovePageDown", | |
| "shift-pagedown": "editor::SelectPageDown", | |
| "cmd-pagedown": "editor::PageDown", | |
| "ctrl-pagedown": "editor::LineDown", | |
| "ctrl-p": "editor::MoveUp", | |
| "ctrl-n": "editor::MoveDown", | |
| "ctrl-b": "editor::MoveLeft", | |
| "left": "editor::MoveLeft", | |
| "ctrl-f": "editor::MoveRight", | |
| "right": "editor::MoveRight", | |
| "ctrl-l": "editor::ScrollCursorCenter", | |
| "alt-left": "editor::MoveToPreviousWordStart", | |
| "alt-right": "editor::MoveToNextWordEnd", | |
| "cmd-left": [ | |
| "editor::MoveToBeginningOfLine", | |
| { "stop_at_soft_wraps": true, "stop_at_indent": true } | |
| ], | |
| "ctrl-a": [ | |
| "editor::MoveToBeginningOfLine", | |
| { "stop_at_soft_wraps": false, "stop_at_indent": true } | |
| ], | |
| "home": [ | |
| "editor::MoveToBeginningOfLine", | |
| { "stop_at_soft_wraps": true, "stop_at_indent": true } | |
| ], | |
| "cmd-right": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": true }], | |
| "ctrl-e": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": false }], | |
| "end": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": true }], | |
| "cmd-up": "editor::MoveToBeginning", | |
| "cmd-down": "editor::MoveToEnd", | |
| "cmd-home": "editor::MoveToBeginning", // Typed via `cmd-fn-left` | |
| "cmd-end": "editor::MoveToEnd", // Typed via `cmd-fn-right` | |
| "shift-up": "editor::SelectUp", | |
| "ctrl-shift-p": "editor::SelectUp", | |
| "shift-down": "editor::SelectDown", | |
| "ctrl-shift-n": "editor::SelectDown", | |
| "shift-left": "editor::SelectLeft", | |
| "ctrl-shift-b": "editor::SelectLeft", | |
| "shift-right": "editor::SelectRight", | |
| "ctrl-shift-f": "editor::SelectRight", | |
| "alt-shift-left": "editor::SelectToPreviousWordStart", // cursorWordLeftSelect | |
| "alt-shift-right": "editor::SelectToNextWordEnd", // cursorWordRightSelect | |
| "ctrl-shift-up": "editor::SelectToStartOfParagraph", | |
| "ctrl-shift-down": "editor::SelectToEndOfParagraph", | |
| "cmd-shift-up": "editor::SelectToBeginning", | |
| "cmd-shift-down": "editor::SelectToEnd", | |
| "cmd-a": "editor::SelectAll", | |
| "cmd-l": "editor::SelectLine", | |
| "cmd-shift-i": "editor::Format", | |
| "alt-shift-o": "editor::OrganizeImports", | |
| "cmd-shift-left": [ | |
| "editor::SelectToBeginningOfLine", | |
| { "stop_at_soft_wraps": true, "stop_at_indent": true } | |
| ], | |
| "shift-home": [ | |
| "editor::SelectToBeginningOfLine", | |
| { "stop_at_soft_wraps": true, "stop_at_indent": true } | |
| ], | |
| "ctrl-shift-a": [ | |
| "editor::SelectToBeginningOfLine", | |
| { "stop_at_soft_wraps": true, "stop_at_indent": true } | |
| ], | |
| "cmd-shift-right": [ | |
| "editor::SelectToEndOfLine", | |
| { "stop_at_soft_wraps": true } | |
| ], | |
| "shift-end": [ | |
| "editor::SelectToEndOfLine", | |
| { "stop_at_soft_wraps": true } | |
| ], | |
| "ctrl-shift-e": [ | |
| "editor::SelectToEndOfLine", | |
| { "stop_at_soft_wraps": true } | |
| ], | |
| "ctrl-v": ["editor::MovePageDown", { "center_cursor": true }], | |
| "ctrl-shift-v": ["editor::MovePageUp", { "center_cursor": true }], | |
| "ctrl-cmd-space": "editor::ShowCharacterPalette", | |
| "cmd-;": "editor::ToggleLineNumbers", | |
| "cmd-'": "editor::ToggleSelectedDiffHunks", | |
| "cmd-\"": "editor::ExpandAllDiffHunks", | |
| "cmd-alt-g b": "git::Blame", | |
| "cmd-alt-g m": "git::OpenModifiedFiles", | |
| "cmd-i": "editor::ShowSignatureHelp", | |
| "f9": "editor::ToggleBreakpoint", | |
| "shift-f9": "editor::EditLogBreakpoint", | |
| "ctrl-f12": "editor::GoToDeclaration", | |
| "alt-ctrl-f12": "editor::GoToDeclarationSplit", | |
| "ctrl-cmd-e": "editor::ToggleEditPrediction" | |
| } | |
| }, | |
| { | |
| "context": "Editor && mode == full", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "shift-enter": "editor::Newline", | |
| "enter": "editor::Newline", | |
| "cmd-enter": "editor::NewlineBelow", | |
| "cmd-shift-enter": "editor::NewlineAbove", | |
| "cmd-k z": "editor::ToggleSoftWrap", | |
| "cmd-f": "buffer_search::Deploy", | |
| "cmd-alt-f": "buffer_search::DeployReplace", | |
| "cmd-alt-l": [ | |
| "buffer_search::Deploy", | |
| { "selection_search_enabled": true } | |
| ], | |
| "cmd-e": ["buffer_search::Deploy", { "focus": false }], | |
| "cmd->": "assistant::QuoteSelection", | |
| "cmd-<": "assistant::InsertIntoEditor", | |
| "cmd-alt-e": "editor::SelectEnclosingSymbol", | |
| "alt-enter": "editor::OpenSelectionsInMultibuffer" | |
| } | |
| }, | |
| { | |
| "context": "Editor && multibuffer", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-up": "editor::MoveToStartOfExcerpt", | |
| "cmd-down": "editor::MoveToStartOfNextExcerpt", | |
| "cmd-shift-up": "editor::SelectToStartOfExcerpt", | |
| "cmd-shift-down": "editor::SelectToStartOfNextExcerpt" | |
| } | |
| }, | |
| { | |
| "context": "Editor && mode == full && edit_prediction", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "alt-tab": "editor::NextEditPrediction", | |
| "alt-shift-tab": "editor::PreviousEditPrediction" | |
| } | |
| }, | |
| { | |
| "context": "Editor && !edit_prediction", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "alt-tab": "editor::ShowEditPrediction" | |
| } | |
| }, | |
| { | |
| "context": "Editor && mode == auto_height", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-enter": "editor::Newline", | |
| "shift-enter": "editor::Newline", | |
| "ctrl-shift-enter": "editor::NewlineBelow" | |
| } | |
| }, | |
| { | |
| "context": "Markdown", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-c": "markdown::Copy" | |
| } | |
| }, | |
| { | |
| "context": "Editor && jupyter && !ContextEditor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-shift-enter": "repl::Run", | |
| "ctrl-alt-enter": "repl::RunInPlace" | |
| } | |
| }, | |
| { | |
| "context": "Editor && !agent_diff", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-alt-z": "git::Restore", | |
| "cmd-alt-y": "git::ToggleStaged", | |
| "cmd-y": "git::StageAndNext", | |
| "cmd-shift-y": "git::UnstageAndNext" | |
| } | |
| }, | |
| { | |
| "context": "AgentDiff", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-y": "agent::Keep", | |
| "cmd-n": "agent::Reject", | |
| "cmd-shift-y": "agent::KeepAll", | |
| "cmd-shift-n": "agent::RejectAll" | |
| } | |
| }, | |
| { | |
| "context": "Editor && editor_agent_diff", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-y": "agent::Keep", | |
| "cmd-n": "agent::Reject", | |
| "cmd-shift-y": "agent::KeepAll", | |
| "cmd-shift-n": "agent::RejectAll", | |
| "shift-ctrl-r": "agent::OpenAgentDiff" | |
| } | |
| }, | |
| { | |
| "context": "ContextEditor > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-enter": "assistant::Assist", | |
| "cmd-s": "workspace::Save", | |
| "cmd-<": "assistant::InsertIntoEditor", | |
| "shift-enter": "assistant::Split", | |
| "ctrl-r": "assistant::CycleMessageRole", | |
| "enter": "assistant::ConfirmCommand", | |
| "alt-enter": "editor::Newline", | |
| "cmd-k c": "assistant::CopyCode", | |
| "cmd-g": "search::SelectNextMatch", | |
| "cmd-shift-g": "search::SelectPreviousMatch", | |
| "cmd-k l": "agent::OpenRulesLibrary" | |
| } | |
| }, | |
| { | |
| "context": "AgentPanel", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-n": "agent::NewThread", | |
| "cmd-alt-n": "agent::NewTextThread", | |
| "cmd-shift-h": "agent::OpenHistory", | |
| "cmd-alt-c": "agent::OpenConfiguration", | |
| "cmd-alt-p": "agent::OpenRulesLibrary", | |
| "cmd-i": "agent::ToggleProfileSelector", | |
| "cmd-alt-/": "agent::ToggleModelSelector", | |
| "cmd-shift-a": "agent::ToggleContextPicker", | |
| "cmd-shift-j": "agent::ToggleNavigationMenu", | |
| "cmd-shift-i": "agent::ToggleOptionsMenu", | |
| "shift-alt-escape": "agent::ExpandMessageEditor", | |
| "cmd->": "assistant::QuoteSelection", | |
| "cmd-alt-e": "agent::RemoveAllContext", | |
| "cmd-shift-e": "project_panel::ToggleFocus", | |
| "cmd-ctrl-b": "agent::ToggleBurnMode", | |
| "cmd-shift-enter": "agent::ContinueThread", | |
| "alt-enter": "agent::ContinueWithBurnMode" | |
| } | |
| }, | |
| { | |
| "context": "AgentPanel > NavigationMenu", | |
| "bindings": { | |
| "shift-backspace": "agent::DeleteRecentlyOpenThread" | |
| } | |
| }, | |
| { | |
| "context": "AgentPanel > Markdown", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-c": "markdown::CopyAsMarkdown" | |
| } | |
| }, | |
| { | |
| "context": "AgentPanel && prompt_editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-n": "agent::NewTextThread", | |
| "cmd-alt-t": "agent::NewThread" | |
| } | |
| }, | |
| { | |
| "context": "MessageEditor > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "enter": "agent::Chat", | |
| "cmd-enter": "agent::ChatWithFollow", | |
| "cmd-i": "agent::ToggleProfileSelector", | |
| "shift-ctrl-r": "agent::OpenAgentDiff", | |
| "cmd-shift-y": "agent::KeepAll", | |
| "cmd-shift-n": "agent::RejectAll" | |
| } | |
| }, | |
| { | |
| "context": "EditMessageEditor > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": "menu::Cancel", | |
| "enter": "menu::Confirm", | |
| "alt-enter": "editor::Newline" | |
| } | |
| }, | |
| { | |
| "context": "AgentFeedbackMessageEditor > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": "menu::Cancel", | |
| "enter": "menu::Confirm", | |
| "alt-enter": "editor::Newline" | |
| } | |
| }, | |
| { | |
| "context": "ContextStrip", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "up": "agent::FocusUp", | |
| "right": "agent::FocusRight", | |
| "left": "agent::FocusLeft", | |
| "down": "agent::FocusDown", | |
| "backspace": "agent::RemoveFocusedContext", | |
| "enter": "agent::AcceptSuggestedContext" | |
| } | |
| }, | |
| { | |
| "context": "AgentConfiguration", | |
| "bindings": { | |
| "ctrl--": "pane::GoBack" | |
| } | |
| }, | |
| { | |
| "context": "ThreadHistory", | |
| "bindings": { | |
| "ctrl--": "pane::GoBack" | |
| } | |
| }, | |
| { | |
| "context": "ThreadHistory > Editor", | |
| "bindings": { | |
| "shift-backspace": "agent::RemoveSelectedThread" | |
| } | |
| }, | |
| { | |
| "context": "PromptLibrary", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-n": "rules_library::NewRule", | |
| "cmd-shift-s": "rules_library::ToggleDefaultRule", | |
| "cmd-w": "workspace::CloseWindow" | |
| } | |
| }, | |
| { | |
| "context": "BufferSearchBar", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": "buffer_search::Dismiss", | |
| "tab": "buffer_search::FocusEditor", | |
| "enter": "search::SelectNextMatch", | |
| "shift-enter": "search::SelectPreviousMatch", | |
| "alt-enter": "search::SelectAllMatches", | |
| "cmd-f": "search::FocusSearch", | |
| "cmd-alt-f": "search::ToggleReplace", | |
| "cmd-alt-l": "search::ToggleSelection", | |
| "cmd-shift-o": "outline::Toggle" | |
| } | |
| }, | |
| { | |
| "context": "BufferSearchBar && in_replace > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "enter": "search::ReplaceNext", | |
| "cmd-enter": "search::ReplaceAll" | |
| } | |
| }, | |
| { | |
| "context": "BufferSearchBar && !in_replace > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "up": "search::PreviousHistoryQuery", | |
| "down": "search::NextHistoryQuery" | |
| } | |
| }, | |
| { | |
| "context": "ProjectSearchBar", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": "project_search::ToggleFocus", | |
| "cmd-shift-j": "project_search::ToggleFilters", | |
| "cmd-shift-f": "search::FocusSearch", | |
| "cmd-shift-h": "search::ToggleReplace", | |
| "alt-cmd-g": "search::ToggleRegex", | |
| "alt-cmd-x": "search::ToggleRegex" | |
| } | |
| }, | |
| { | |
| "context": "ProjectSearchBar > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "up": "search::PreviousHistoryQuery", | |
| "down": "search::NextHistoryQuery" | |
| } | |
| }, | |
| { | |
| "context": "ProjectSearchBar && in_replace > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "enter": "search::ReplaceNext", | |
| "cmd-enter": "search::ReplaceAll" | |
| } | |
| }, | |
| { | |
| "context": "ProjectSearchView", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": "project_search::ToggleFocus", | |
| "cmd-shift-j": "project_search::ToggleFilters", | |
| "cmd-shift-h": "search::ToggleReplace", | |
| "alt-cmd-g": "search::ToggleRegex", | |
| "alt-cmd-x": "search::ToggleRegex" | |
| } | |
| }, | |
| { | |
| "context": "Pane", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "alt-cmd-left": "pane::ActivatePreviousItem", | |
| "cmd-{": "pane::ActivatePreviousItem", | |
| "alt-cmd-right": "pane::ActivateNextItem", | |
| "cmd-}": "pane::ActivateNextItem", | |
| "ctrl-shift-pageup": "pane::SwapItemLeft", | |
| "ctrl-shift-pagedown": "pane::SwapItemRight", | |
| "cmd-w": ["pane::CloseActiveItem", { "close_pinned": false }], | |
| "alt-cmd-t": ["pane::CloseInactiveItems", { "close_pinned": false }], | |
| "ctrl-alt-cmd-w": "workspace::CloseInactiveTabsAndPanes", | |
| "cmd-k e": ["pane::CloseItemsToTheLeft", { "close_pinned": false }], | |
| "cmd-k t": ["pane::CloseItemsToTheRight", { "close_pinned": false }], | |
| "cmd-k u": ["pane::CloseCleanItems", { "close_pinned": false }], | |
| "cmd-k w": ["pane::CloseAllItems", { "close_pinned": false }], | |
| "cmd-k cmd-w": "workspace::CloseAllItemsAndPanes", | |
| "cmd-f": "project_search::ToggleFocus", | |
| "cmd-g": "search::SelectNextMatch", | |
| "cmd-shift-g": "search::SelectPreviousMatch", | |
| "cmd-shift-h": "search::ToggleReplace", | |
| "cmd-alt-l": "search::ToggleSelection", | |
| "alt-enter": "search::SelectAllMatches", | |
| "alt-cmd-c": "search::ToggleCaseSensitive", | |
| "alt-cmd-w": "search::ToggleWholeWord", | |
| "alt-cmd-f": "project_search::ToggleFilters", | |
| "alt-cmd-x": "search::ToggleRegex", | |
| "cmd-k shift-enter": "pane::TogglePinTab" | |
| } | |
| }, | |
| // Bindings from VS Code | |
| { | |
| "context": "Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-[": "editor::Outdent", | |
| "cmd-]": "editor::Indent", | |
| "cmd-ctrl-p": "editor::AddSelectionAbove", // Insert cursor above | |
| "cmd-alt-up": "editor::AddSelectionAbove", | |
| "cmd-ctrl-n": "editor::AddSelectionBelow", // Insert cursor below | |
| "cmd-alt-down": "editor::AddSelectionBelow", | |
| "cmd-shift-k": "editor::DeleteLine", | |
| "alt-up": "editor::MoveLineUp", | |
| "alt-down": "editor::MoveLineDown", | |
| "alt-shift-up": "editor::DuplicateLineUp", | |
| "alt-shift-down": "editor::DuplicateLineDown", | |
| "ctrl-shift-right": "editor::SelectLargerSyntaxNode", // Expand Selection | |
| "ctrl-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink Selection | |
| "cmd-d": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand | |
| "cmd-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection | |
| "cmd-f2": "editor::SelectAllMatches", // Select all occurrences of current word | |
| "cmd-k cmd-d": ["editor::SelectNext", { "replace_newest": true }], // editor.action.moveSelectionToNextFindMatch / find_under_expand_skip | |
| // macOS binds `ctrl-cmd-d` to Show Dictionary which breaks these two binds | |
| // To use `ctrl-cmd-d` or `ctrl-k ctrl-cmd-d` in Zed you must execute this command and then restart: | |
| // defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 70 '<dict><key>enabled</key><false/></dict>' | |
| "ctrl-cmd-d": ["editor::SelectPrevious", { "replace_newest": false }], // editor.action.addSelectionToPreviousFindMatch | |
| "cmd-k ctrl-cmd-d": [ | |
| "editor::SelectPrevious", | |
| { "replace_newest": true } | |
| ], // editor.action.moveSelectionToPreviousFindMatch | |
| "cmd-k cmd-i": "editor::Hover", | |
| "cmd-/": ["editor::ToggleComments", { "advance_downwards": false }], | |
| "cmd-u": "editor::UndoSelection", | |
| "cmd-shift-u": "editor::RedoSelection", | |
| "f8": "editor::GoToDiagnostic", | |
| "shift-f8": "editor::GoToPreviousDiagnostic", | |
| "f2": "editor::Rename", | |
| "f12": "editor::GoToDefinition", | |
| "alt-f12": "editor::GoToDefinitionSplit", | |
| "cmd-f12": "editor::GoToTypeDefinition", | |
| "shift-f12": "editor::GoToImplementation", | |
| "alt-cmd-f12": "editor::GoToTypeDefinitionSplit", | |
| "alt-shift-f12": "editor::FindAllReferences", | |
| "cmd-|": "editor::MoveToEnclosingBracket", | |
| "ctrl-m": "editor::MoveToEnclosingBracket", | |
| "alt-cmd-[": "editor::Fold", | |
| "alt-cmd-]": "editor::UnfoldLines", | |
| "cmd-k cmd-l": "editor::ToggleFold", | |
| "cmd-k cmd-[": "editor::FoldRecursive", | |
| "cmd-k cmd-]": "editor::UnfoldRecursive", | |
| "cmd-k cmd-1": ["editor::FoldAtLevel", 1], | |
| "cmd-k cmd-2": ["editor::FoldAtLevel", 2], | |
| "cmd-k cmd-3": ["editor::FoldAtLevel", 3], | |
| "cmd-k cmd-4": ["editor::FoldAtLevel", 4], | |
| "cmd-k cmd-5": ["editor::FoldAtLevel", 5], | |
| "cmd-k cmd-6": ["editor::FoldAtLevel", 6], | |
| "cmd-k cmd-7": ["editor::FoldAtLevel", 7], | |
| "cmd-k cmd-8": ["editor::FoldAtLevel", 8], | |
| "cmd-k cmd-9": ["editor::FoldAtLevel", 9], | |
| "cmd-k cmd-0": "editor::FoldAll", | |
| "cmd-k cmd-j": "editor::UnfoldAll", | |
| // Using `ctrl-space` / `ctrl-shift-space` in Zed requires disabling the macOS global shortcut. | |
| // System Preferences->Keyboard->Keyboard Shortcuts->Input Sources->Select the previous input source (uncheck) | |
| "ctrl-space": "editor::ShowCompletions", | |
| "ctrl-shift-space": "editor::ShowWordCompletions", | |
| "cmd-.": "editor::ToggleCodeActions", | |
| "cmd-k r": "editor::RevealInFileManager", | |
| "cmd-\\": "pane::SplitRight", | |
| "ctrl-cmd-c": "editor::DisplayCursorNames" | |
| } | |
| }, | |
| { | |
| "context": "Editor && extension == md", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-k v": "markdown::OpenPreviewToTheSide", | |
| "cmd-shift-v": "markdown::OpenPreview" | |
| } | |
| }, | |
| { | |
| "context": "Editor && extension == svg", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-k v": "svg::OpenPreviewToTheSide", | |
| "cmd-shift-v": "svg::OpenPreview" | |
| } | |
| }, | |
| { | |
| "context": "Editor && mode == full", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-shift-o": "outline::Toggle", | |
| "ctrl-g": "go_to_line::Toggle", | |
| "cmd-shift-backspace": "editor::GoToPreviousChange", | |
| "cmd-shift-alt-backspace": "editor::GoToNextChange" | |
| } | |
| }, | |
| { | |
| "context": "Pane", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-1": ["pane::ActivateItem", 0], | |
| "ctrl-2": ["pane::ActivateItem", 1], | |
| "ctrl-3": ["pane::ActivateItem", 2], | |
| "ctrl-4": ["pane::ActivateItem", 3], | |
| "ctrl-5": ["pane::ActivateItem", 4], | |
| "ctrl-6": ["pane::ActivateItem", 5], | |
| "ctrl-7": ["pane::ActivateItem", 6], | |
| "ctrl-8": ["pane::ActivateItem", 7], | |
| "ctrl-9": ["pane::ActivateItem", 8], | |
| "ctrl-0": "pane::ActivateLastItem", | |
| "ctrl--": "pane::GoBack", | |
| "ctrl-_": "pane::GoForward", | |
| "cmd-shift-f": "pane::DeploySearch" | |
| } | |
| }, | |
| { | |
| "context": "Workspace", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| // Change the default action on `menu::Confirm` by setting the parameter | |
| // "alt-cmd-o": ["projects::OpenRecent", {"create_new_window": true }], | |
| "alt-cmd-o": ["projects::OpenRecent", { "create_new_window": false }], | |
| "ctrl-cmd-o": [ | |
| "projects::OpenRemote", | |
| { "from_existing_connection": false, "create_new_window": false } | |
| ], | |
| "ctrl-cmd-shift-o": [ | |
| "projects::OpenRemote", | |
| { "from_existing_connection": true, "create_new_window": false } | |
| ], | |
| "ctrl-~": "workspace::NewTerminal", | |
| "cmd-s": "workspace::Save", | |
| "cmd-k s": "workspace::SaveWithoutFormat", | |
| "alt-shift-enter": "toast::RunAction", | |
| "cmd-shift-s": "workspace::SaveAs", | |
| "cmd-shift-n": "workspace::NewWindow", | |
| "ctrl-`": "terminal_panel::ToggleFocus", | |
| "cmd-1": ["workspace::ActivatePane", 0], | |
| "cmd-2": ["workspace::ActivatePane", 1], | |
| "cmd-3": ["workspace::ActivatePane", 2], | |
| "cmd-4": ["workspace::ActivatePane", 3], | |
| "cmd-5": ["workspace::ActivatePane", 4], | |
| "cmd-6": ["workspace::ActivatePane", 5], | |
| "cmd-7": ["workspace::ActivatePane", 6], | |
| "cmd-8": ["workspace::ActivatePane", 7], | |
| "cmd-9": ["workspace::ActivatePane", 8], | |
| "cmd-b": "workspace::ToggleLeftDock", | |
| "cmd-alt-b": "workspace::ToggleRightDock", | |
| "cmd-r": "workspace::ToggleRightDock", | |
| "cmd-j": "workspace::ToggleBottomDock", | |
| "alt-cmd-y": "workspace::CloseAllDocks", | |
| "cmd-shift-f": "pane::DeploySearch", | |
| "cmd-shift-h": ["pane::DeploySearch", { "replace_enabled": true }], | |
| "cmd-shift-t": "pane::ReopenClosedItem", | |
| "cmd-k cmd-s": "zed::OpenKeymap", | |
| "cmd-k cmd-t": "theme_selector::Toggle", | |
| "cmd-t": "project_symbols::Toggle", | |
| "cmd-p": "file_finder::Toggle", | |
| "ctrl-tab": "tab_switcher::Toggle", | |
| "ctrl-shift-tab": ["tab_switcher::Toggle", { "select_last": true }], | |
| "cmd-shift-p": "command_palette::Toggle", | |
| "cmd-shift-m": "diagnostics::Deploy", | |
| "cmd-shift-e": "project_panel::ToggleFocus", | |
| "cmd-shift-b": "outline_panel::ToggleFocus", | |
| "ctrl-shift-g": "git_panel::ToggleFocus", | |
| "cmd-shift-d": "debug_panel::ToggleFocus", | |
| "cmd-?": "agent::ToggleFocus", | |
| "cmd-alt-s": "workspace::SaveAll", | |
| "cmd-k m": "language_selector::Toggle", | |
| "escape": "workspace::Unfollow", | |
| "cmd-k cmd-left": "workspace::ActivatePaneLeft", | |
| "cmd-k cmd-right": "workspace::ActivatePaneRight", | |
| "cmd-k cmd-up": "workspace::ActivatePaneUp", | |
| "cmd-k cmd-down": "workspace::ActivatePaneDown", | |
| "cmd-k shift-left": "workspace::SwapPaneLeft", | |
| "cmd-k shift-right": "workspace::SwapPaneRight", | |
| "cmd-k shift-up": "workspace::SwapPaneUp", | |
| "cmd-k shift-down": "workspace::SwapPaneDown", | |
| "cmd-shift-x": "zed::Extensions", | |
| "f5": "debugger::RerunLastSession" | |
| } | |
| }, | |
| { | |
| "context": "Workspace && !Terminal", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-n": "workspace::NewFile", | |
| "cmd-shift-r": "task::Spawn", | |
| "cmd-alt-r": "task::Rerun", | |
| "ctrl-alt-shift-r": ["task::Spawn", { "reveal_target": "center" }] | |
| // also possible to spawn tasks by name: | |
| // "foo-bar": ["task::Spawn", { "task_name": "MyTask", "reveal_target": "dock" }] | |
| // or by tag: | |
| // "foo-bar": ["task::Spawn", { "task_tag": "MyTag" }], | |
| } | |
| }, | |
| { | |
| "context": "Workspace && debugger_running", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "f5": null | |
| } | |
| }, | |
| { | |
| "context": "Workspace && debugger_stopped", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "f5": "debugger::Continue" | |
| } | |
| }, | |
| // Bindings from Sublime Text | |
| { | |
| "context": "Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-j": "editor::JoinLines", | |
| "ctrl-alt-backspace": "editor::DeleteToPreviousSubwordStart", | |
| "ctrl-alt-h": "editor::DeleteToPreviousSubwordStart", | |
| "ctrl-alt-delete": "editor::DeleteToNextSubwordEnd", | |
| "ctrl-alt-d": "editor::DeleteToNextSubwordEnd", | |
| "ctrl-alt-left": "editor::MoveToPreviousSubwordStart", | |
| "ctrl-alt-b": "editor::MoveToPreviousSubwordStart", | |
| "ctrl-alt-right": "editor::MoveToNextSubwordEnd", | |
| "ctrl-alt-f": "editor::MoveToNextSubwordEnd", | |
| "ctrl-alt-shift-left": "editor::SelectToPreviousSubwordStart", | |
| "ctrl-alt-shift-b": "editor::SelectToPreviousSubwordStart", | |
| "ctrl-alt-shift-right": "editor::SelectToNextSubwordEnd", | |
| "ctrl-alt-shift-f": "editor::SelectToNextSubwordEnd" | |
| } | |
| }, | |
| // Bindings from Atom | |
| { | |
| "context": "Pane", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-k up": "pane::SplitUp", | |
| "cmd-k down": "pane::SplitDown", | |
| "cmd-k left": "pane::SplitLeft", | |
| "cmd-k right": "pane::SplitRight" | |
| } | |
| }, | |
| // Bindings that should be unified with bindings for more general actions | |
| { | |
| "context": "Editor && renaming", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "enter": "editor::ConfirmRename" | |
| } | |
| }, | |
| { | |
| "context": "Editor && showing_completions", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "enter": "editor::ConfirmCompletion", | |
| "shift-enter": "editor::ConfirmCompletionReplace", | |
| "tab": "editor::ComposeCompletion" | |
| } | |
| }, | |
| { | |
| "context": "Editor && edit_prediction", | |
| "bindings": { | |
| "alt-tab": "editor::AcceptEditPrediction", | |
| "tab": "editor::AcceptEditPrediction", | |
| "ctrl-cmd-right": "editor::AcceptPartialEditPrediction" | |
| } | |
| }, | |
| { | |
| "context": "Editor && edit_prediction_conflict", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "alt-tab": "editor::AcceptEditPrediction", | |
| "ctrl-cmd-right": "editor::AcceptPartialEditPrediction" | |
| } | |
| }, | |
| { | |
| "context": "Editor && showing_code_actions", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "enter": "editor::ConfirmCodeAction" | |
| } | |
| }, | |
| { | |
| "context": "Editor && (showing_code_actions || showing_completions)", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "up": "editor::ContextMenuPrevious", | |
| "ctrl-p": "editor::ContextMenuPrevious", | |
| "down": "editor::ContextMenuNext", | |
| "ctrl-n": "editor::ContextMenuNext", | |
| "pageup": "editor::ContextMenuFirst", | |
| "pagedown": "editor::ContextMenuLast" | |
| } | |
| }, | |
| // Custom bindings | |
| { | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-alt-cmd-f": "workspace::FollowNextCollaborator", | |
| // TODO: Move this to a dock open action | |
| "cmd-shift-c": "collab_panel::ToggleFocus", | |
| // Only available in debug builds: opens an element inspector for development. | |
| "cmd-alt-i": "dev::ToggleInspector" | |
| } | |
| }, | |
| { | |
| "context": "!ContextEditor > Editor && mode == full", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "alt-enter": "editor::OpenExcerpts", | |
| "shift-enter": "editor::ExpandExcerpts", | |
| "cmd-alt-enter": "editor::OpenExcerptsSplit", | |
| "cmd-shift-e": "pane::RevealInProjectPanel", | |
| "cmd-f8": "editor::GoToHunk", | |
| "cmd-shift-f8": "editor::GoToPreviousHunk", | |
| "ctrl-enter": "assistant::InlineAssist", | |
| "ctrl-:": "editor::ToggleInlayHints" | |
| } | |
| }, | |
| { | |
| "context": "PromptEditor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-shift-a": "agent::ToggleContextPicker", | |
| "cmd-alt-/": "agent::ToggleModelSelector", | |
| "cmd-alt-e": "agent::RemoveAllContext", | |
| "ctrl-[": "agent::CyclePreviousInlineAssist", | |
| "ctrl-]": "agent::CycleNextInlineAssist" | |
| } | |
| }, | |
| { | |
| "context": "Prompt", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "left": "menu::SelectPrevious", | |
| "right": "menu::SelectNext", | |
| "h": "menu::SelectPrevious", | |
| "l": "menu::SelectNext" | |
| } | |
| }, | |
| { | |
| "context": "ProjectSearchBar && !in_replace", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-enter": "project_search::SearchInNew" | |
| } | |
| }, | |
| { | |
| "context": "OutlinePanel && not_editing", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": "menu::Cancel", | |
| "left": "outline_panel::CollapseSelectedEntry", | |
| "right": "outline_panel::ExpandSelectedEntry", | |
| "cmd-alt-c": "workspace::CopyPath", | |
| "alt-cmd-shift-c": "workspace::CopyRelativePath", | |
| "alt-cmd-r": "outline_panel::RevealInFileManager", | |
| "space": "outline_panel::OpenSelectedEntry", | |
| "shift-down": "menu::SelectNext", | |
| "shift-up": "menu::SelectPrevious", | |
| "alt-enter": "editor::OpenExcerpts", | |
| "cmd-alt-enter": "editor::OpenExcerptsSplit" | |
| } | |
| }, | |
| { | |
| "context": "ProjectPanel", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "left": "project_panel::CollapseSelectedEntry", | |
| "right": "project_panel::ExpandSelectedEntry", | |
| "cmd-n": "project_panel::NewFile", | |
| "cmd-d": "project_panel::Duplicate", | |
| "alt-cmd-n": "project_panel::NewDirectory", | |
| "cmd-x": "project_panel::Cut", | |
| "cmd-c": "project_panel::Copy", | |
| "cmd-v": "project_panel::Paste", | |
| "cmd-alt-c": "workspace::CopyPath", | |
| "alt-cmd-shift-c": "workspace::CopyRelativePath", | |
| "enter": "project_panel::Rename", | |
| "f2": "project_panel::Rename", | |
| "backspace": ["project_panel::Trash", { "skip_prompt": false }], | |
| "delete": ["project_panel::Trash", { "skip_prompt": false }], | |
| "cmd-backspace": ["project_panel::Trash", { "skip_prompt": true }], | |
| "cmd-delete": ["project_panel::Delete", { "skip_prompt": false }], | |
| "alt-cmd-r": "project_panel::RevealInFileManager", | |
| "ctrl-shift-enter": "project_panel::OpenWithSystem", | |
| "cmd-alt-backspace": ["project_panel::Delete", { "skip_prompt": false }], | |
| "cmd-alt-shift-f": "project_panel::NewSearchInDirectory", | |
| "shift-down": "menu::SelectNext", | |
| "shift-up": "menu::SelectPrevious", | |
| "escape": "menu::Cancel" | |
| } | |
| }, | |
| { | |
| "context": "ProjectPanel && not_editing", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "space": "project_panel::Open" | |
| } | |
| }, | |
| { | |
| "context": "VariableList", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "left": "variable_list::CollapseSelectedEntry", | |
| "right": "variable_list::ExpandSelectedEntry", | |
| "enter": "variable_list::EditVariable", | |
| "cmd-c": "variable_list::CopyVariableValue", | |
| "cmd-alt-c": "variable_list::CopyVariableName", | |
| "delete": "variable_list::RemoveWatch", | |
| "backspace": "variable_list::RemoveWatch", | |
| "alt-enter": "variable_list::AddWatch" | |
| } | |
| }, | |
| { | |
| "context": "GitPanel && ChangesList", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "up": "menu::SelectPrevious", | |
| "down": "menu::SelectNext", | |
| "cmd-up": "menu::SelectFirst", | |
| "cmd-down": "menu::SelectLast", | |
| "enter": "menu::Confirm", | |
| "cmd-alt-y": "git::ToggleStaged", | |
| "space": "git::ToggleStaged", | |
| "cmd-y": "git::StageFile", | |
| "cmd-shift-y": "git::UnstageFile", | |
| "alt-down": "git_panel::FocusEditor", | |
| "tab": "git_panel::FocusEditor", | |
| "shift-tab": "git_panel::FocusEditor", | |
| "escape": "git_panel::ToggleFocus", | |
| "cmd-enter": "git::Commit", | |
| "cmd-shift-enter": "git::Amend", | |
| "backspace": ["git::RestoreFile", { "skip_prompt": false }], | |
| "delete": ["git::RestoreFile", { "skip_prompt": false }], | |
| "cmd-backspace": ["git::RestoreFile", { "skip_prompt": true }], | |
| "cmd-delete": ["git::RestoreFile", { "skip_prompt": true }] | |
| } | |
| }, | |
| { | |
| "context": "GitPanel && CommitEditor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": "git::Cancel" | |
| } | |
| }, | |
| { | |
| "context": "GitDiff > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-enter": "git::Commit", | |
| "cmd-shift-enter": "git::Amend", | |
| "cmd-ctrl-y": "git::StageAll", | |
| "cmd-ctrl-shift-y": "git::UnstageAll" | |
| } | |
| }, | |
| { | |
| "context": "GitPanel > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "enter": "editor::Newline", | |
| "cmd-enter": "git::Commit", | |
| "cmd-shift-enter": "git::Amend", | |
| "tab": "git_panel::FocusChanges", | |
| "shift-tab": "git_panel::FocusChanges", | |
| "alt-up": "git_panel::FocusChanges", | |
| "shift-escape": "git::ExpandCommitEditor", | |
| "alt-tab": "git::GenerateCommitMessage" | |
| } | |
| }, | |
| { | |
| "context": "GitPanel", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-g ctrl-g": "git::Fetch", | |
| "ctrl-g up": "git::Push", | |
| "ctrl-g down": "git::Pull", | |
| "ctrl-g shift-up": "git::ForcePush", | |
| "ctrl-g d": "git::Diff", | |
| "ctrl-g backspace": "git::RestoreTrackedFiles", | |
| "ctrl-g shift-backspace": "git::TrashUntrackedFiles", | |
| "cmd-ctrl-y": "git::StageAll", | |
| "cmd-ctrl-shift-y": "git::UnstageAll" | |
| } | |
| }, | |
| { | |
| "context": "GitCommit > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "enter": "editor::Newline", | |
| "escape": "menu::Cancel", | |
| "cmd-enter": "git::Commit", | |
| "cmd-shift-enter": "git::Amend", | |
| "alt-tab": "git::GenerateCommitMessage" | |
| } | |
| }, | |
| { | |
| "context": "DebugPanel", | |
| "bindings": { | |
| "cmd-t": "debugger::ToggleThreadPicker", | |
| "cmd-i": "debugger::ToggleSessionPicker", | |
| "shift-alt-escape": "debugger::ToggleExpandItem" | |
| } | |
| }, | |
| { | |
| "context": "BreakpointList", | |
| "bindings": { | |
| "space": "debugger::ToggleEnableBreakpoint", | |
| "backspace": "debugger::UnsetBreakpoint" | |
| } | |
| }, | |
| { | |
| "context": "CollabPanel && not_editing", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-backspace": "collab_panel::Remove", | |
| "space": "menu::Confirm", | |
| "cmd-up": "collab_panel::MoveChannelUp", | |
| "cmd-down": "collab_panel::MoveChannelDown" | |
| } | |
| }, | |
| { | |
| "context": "(CollabPanel && editing) > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "space": "collab_panel::InsertSpace" | |
| } | |
| }, | |
| { | |
| "context": "ChannelModal", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "tab": "channel_modal::ToggleMode" | |
| } | |
| }, | |
| { | |
| "context": "Picker > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": "menu::Cancel", | |
| "up": "menu::SelectPrevious", | |
| "down": "menu::SelectNext", | |
| "tab": "picker::ConfirmCompletion", | |
| "alt-enter": ["picker::ConfirmInput", { "secondary": false }], | |
| "cmd-alt-enter": ["picker::ConfirmInput", { "secondary": true }] | |
| } | |
| }, | |
| { | |
| "context": "ChannelModal > Picker > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "tab": "channel_modal::ToggleMode" | |
| } | |
| }, | |
| { | |
| "context": "FileFinder || (FileFinder > Picker > Editor)", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-shift-a": "file_finder::ToggleSplitMenu", | |
| "cmd-shift-i": "file_finder::ToggleFilterMenu" | |
| } | |
| }, | |
| { | |
| "context": "FileFinder || (FileFinder > Picker > Editor) || (FileFinder > Picker > menu)", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-shift-p": "file_finder::SelectPrevious", | |
| "cmd-j": "pane::SplitDown", | |
| "cmd-k": "pane::SplitUp", | |
| "cmd-h": "pane::SplitLeft", | |
| "cmd-l": "pane::SplitRight" | |
| } | |
| }, | |
| { | |
| "context": "TabSwitcher", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-shift-tab": "menu::SelectPrevious", | |
| "ctrl-up": "menu::SelectPrevious", | |
| "ctrl-down": "menu::SelectNext", | |
| "ctrl-backspace": "tab_switcher::CloseSelectedItem" | |
| } | |
| }, | |
| { | |
| "context": "Terminal", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-cmd-space": "terminal::ShowCharacterPalette", | |
| "cmd-c": "terminal::Copy", | |
| "cmd-v": "terminal::Paste", | |
| "cmd-a": "editor::SelectAll", | |
| "cmd-k": "terminal::Clear", | |
| "cmd-n": "workspace::NewTerminal", | |
| "ctrl-enter": "assistant::InlineAssist", | |
| "ctrl-_": null, // emacs undo | |
| // Some nice conveniences | |
| "cmd-backspace": ["terminal::SendText", "\u0015"], | |
| "cmd-right": ["terminal::SendText", "\u0005"], | |
| "cmd-left": ["terminal::SendText", "\u0001"], | |
| // Terminal.app compatibility | |
| "alt-left": ["terminal::SendText", "\u001bb"], | |
| "alt-right": ["terminal::SendText", "\u001bf"], | |
| "alt-b": ["terminal::SendText", "\u001bb"], | |
| "alt-f": ["terminal::SendText", "\u001bf"], | |
| "ctrl-delete": ["terminal::SendText", "\u001bd"], | |
| // There are conflicting bindings for these keys in the global context. | |
| // these bindings override them, remove at your own risk: | |
| "up": ["terminal::SendKeystroke", "up"], | |
| "pageup": ["terminal::SendKeystroke", "pageup"], | |
| "down": ["terminal::SendKeystroke", "down"], | |
| "pagedown": ["terminal::SendKeystroke", "pagedown"], | |
| "escape": ["terminal::SendKeystroke", "escape"], | |
| "enter": ["terminal::SendKeystroke", "enter"], | |
| "ctrl-c": ["terminal::SendKeystroke", "ctrl-c"], | |
| "ctrl-backspace": ["terminal::SendKeystroke", "ctrl-w"], | |
| "shift-pageup": "terminal::ScrollPageUp", | |
| "cmd-up": "terminal::ScrollPageUp", | |
| "shift-pagedown": "terminal::ScrollPageDown", | |
| "cmd-down": "terminal::ScrollPageDown", | |
| "shift-up": "terminal::ScrollLineUp", | |
| "shift-down": "terminal::ScrollLineDown", | |
| "shift-home": "terminal::ScrollToTop", | |
| "cmd-home": "terminal::ScrollToTop", | |
| "shift-end": "terminal::ScrollToBottom", | |
| "cmd-end": "terminal::ScrollToBottom", | |
| // Using `ctrl-shift-space` in Zed requires disabling the macOS global shortcut. | |
| // System Preferences->Keyboard->Keyboard Shortcuts->Input Sources->Select the previous input source (uncheck) | |
| "ctrl-shift-space": "terminal::ToggleViMode", | |
| "ctrl-alt-up": "pane::SplitUp", | |
| "ctrl-alt-down": "pane::SplitDown", | |
| "ctrl-alt-left": "pane::SplitLeft", | |
| "ctrl-alt-right": "pane::SplitRight", | |
| "cmd-alt-r": "terminal::RerunTask" | |
| } | |
| }, | |
| { | |
| "context": "RateCompletionModal", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "cmd-shift-enter": "zeta::ThumbsUpActiveCompletion", | |
| "cmd-shift-backspace": "zeta::ThumbsDownActiveCompletion", | |
| "shift-down": "zeta::NextEdit", | |
| "shift-up": "zeta::PreviousEdit", | |
| "right": "zeta::PreviewCompletion" | |
| } | |
| }, | |
| { | |
| "context": "RateCompletionModal > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": "zeta::FocusCompletions", | |
| "cmd-shift-enter": "zeta::ThumbsUpActiveCompletion", | |
| "cmd-shift-backspace": "zeta::ThumbsDownActiveCompletion" | |
| } | |
| }, | |
| { | |
| "context": "ZedPredictModal", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": "menu::Cancel" | |
| } | |
| }, | |
| { | |
| "context": "ConfigureContextServerModal > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "escape": "menu::Cancel", | |
| "enter": "editor::Newline", | |
| "cmd-enter": "menu::Confirm" | |
| } | |
| }, | |
| { | |
| "context": "Diagnostics", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-r": "diagnostics::ToggleDiagnosticsRefresh" | |
| } | |
| }, | |
| { | |
| "context": "DebugConsole > Editor", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "enter": "menu::Confirm", | |
| "alt-enter": "console::WatchExpression" | |
| } | |
| }, | |
| { | |
| "context": "RunModal", | |
| "use_key_equivalents": true, | |
| "bindings": { | |
| "ctrl-tab": "pane::ActivateNextItem", | |
| "ctrl-shift-tab": "pane::ActivatePreviousItem" | |
| } | |
| } | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment