[ // Standard macOS bindings { "bindings": { "up": "menu::SelectPrev", "ctrl-p": "menu::SelectPrev", "down": "menu::SelectNext", "ctrl-n": "menu::SelectNext", "cmd-up": "menu::SelectFirst", "cmd-down": "menu::SelectLast", "enter": "menu::Confirm", "escape": "menu::Cancel", "ctrl-c": "menu::Cancel", "shift-cmd-{": "pane::ActivatePrevItem", "shift-cmd-}": "pane::ActivateNextItem", "alt-cmd-left": "pane::ActivatePrevItem", "alt-cmd-right": "pane::ActivateNextItem", "cmd-w": "pane::CloseActiveItem", "cmd-shift-W": "workspace::CloseWindow", "alt-cmd-t": "pane::CloseInactiveItems", "cmd-s": "workspace::Save", "cmd-shift-S": "workspace::SaveAs", "cmd-=": "zed::IncreaseBufferFontSize", "cmd--": "zed::DecreaseBufferFontSize", "cmd-0": "zed::ResetBufferFontSize", "cmd-,": "zed::OpenSettings", "cmd-q": "zed::Quit", "cmd-n": "workspace::NewFile", "cmd-shift-N": "workspace::NewWindow", "cmd-o": "workspace::Open" } }, { "context": "Editor", "bindings": { "escape": "editor::Cancel", "backspace": "editor::Backspace", "shift-backspace": "editor::Backspace", "ctrl-h": "editor::Backspace", "delete": "editor::Delete", "ctrl-d": "editor::Delete", "tab": "editor::Tab", "shift-tab": "editor::TabPrev", "ctrl-k": "editor::CutToEndOfLine", "ctrl-t": "editor::Transpose", "cmd-backspace": "editor::DeleteToBeginningOfLine", "cmd-delete": "editor::DeleteToEndOfLine", "alt-backspace": "editor::DeleteToPreviousWordStart", "alt-delete": "editor::DeleteToNextWordEnd", "alt-h": "editor::DeleteToPreviousWordStart", "alt-d": "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", "down": "editor::MoveDown", "left": "editor::MoveLeft", "right": "editor::MoveRight", "ctrl-p": "editor::MoveUp", "ctrl-n": "editor::MoveDown", "ctrl-b": "editor::MoveLeft", "ctrl-f": "editor::MoveRight", "alt-left": "editor::MoveToPreviousWordStart", "alt-b": "editor::MoveToPreviousWordStart", "alt-right": "editor::MoveToNextWordEnd", "alt-f": "editor::MoveToNextWordEnd", "cmd-left": "editor::MoveToBeginningOfLine", "ctrl-a": "editor::MoveToBeginningOfLine", "cmd-right": "editor::MoveToEndOfLine", "ctrl-e": "editor::MoveToEndOfLine", "cmd-up": "editor::MoveToBeginning", "cmd-down": "editor::MoveToEnd", "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", "alt-shift-B": "editor::SelectToPreviousWordStart", "alt-shift-right": "editor::SelectToNextWordEnd", "alt-shift-F": "editor::SelectToNextWordEnd", "cmd-shift-up": "editor::SelectToBeginning", "cmd-shift-down": "editor::SelectToEnd", "cmd-a": "editor::SelectAll", "cmd-l": "editor::SelectLine", "cmd-shift-left": [ "editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true } ], "ctrl-shift-A": [ "editor::SelectToBeginningOfLine", { "stop_at_soft_wraps": true } ], "cmd-shift-right": [ "editor::SelectToEndOfLine", { "stop_at_soft_wraps": true } ], "ctrl-shift-E": [ "editor::SelectToEndOfLine", { "stop_at_soft_wraps": true } ], "pageup": "editor::PageUp", "pagedown": "editor::PageDown" } }, { "context": "Editor && mode == full", "bindings": { "enter": "editor::Newline", "cmd-f": [ "buffer_search::Deploy", { "focus": true } ], "cmd-e": [ "buffer_search::Deploy", { "focus": false } ] } }, { "context": "Editor && mode == auto_height", "bindings": { "alt-enter": [ "editor::Input", "\n" ] } }, { "context": "BufferSearchBar", "bindings": { "escape": "buffer_search::Dismiss", "cmd-f": "buffer_search::FocusEditor", "enter": "search::SelectNextMatch", "shift-enter": "search::SelectPrevMatch" } }, { "context": "Pane", "bindings": { "cmd-f": "project_search::ToggleFocus", "cmd-g": "search::SelectNextMatch", "cmd-shift-G": "search::SelectPrevMatch", "alt-cmd-c": "search::ToggleCaseSensitive", "alt-cmd-w": "search::ToggleWholeWord", "alt-cmd-r": "search::ToggleRegex" } }, // Bindings from VS Code { "context": "Editor", "bindings": { "cmd-[": "editor::Outdent", "cmd-]": "editor::Indent", "cmd-alt-up": "editor::AddSelectionAbove", "cmd-ctrl-p": "editor::AddSelectionAbove", "cmd-alt-down": "editor::AddSelectionBelow", "cmd-ctrl-n": "editor::AddSelectionBelow", "cmd-d": [ "editor::SelectNext", { "replace_newest": false } ], "cmd-k cmd-d": [ "editor::SelectNext", { "replace_newest": true } ], "cmd-/": "editor::ToggleComments", "alt-up": "editor::SelectLargerSyntaxNode", "alt-down": "editor::SelectSmallerSyntaxNode", "cmd-u": "editor::UndoSelection", "cmd-shift-U": "editor::RedoSelection", "f8": "editor::GoToNextDiagnostic", "shift-f8": "editor::GoToPrevDiagnostic", "f2": "editor::Rename", "f12": "editor::GoToDefinition", "alt-shift-f12": "editor::FindAllReferences", "ctrl-m": "editor::MoveToEnclosingBracket", "alt-cmd-[": "editor::Fold", "alt-cmd-]": "editor::UnfoldLines", "ctrl-space": "editor::ShowCompletions", "cmd-.": "editor::ToggleCodeActions" } }, { "context": "Editor && mode == full", "bindings": { "cmd-shift-O": "outline::Toggle", "ctrl-g": "go_to_line::Toggle" } }, { "context": "Pane", "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", "shift-ctrl-_": "pane::GoForward", "cmd-shift-T": "pane::ReopenClosedItem", "cmd-shift-F": "project_search::ToggleFocus" } }, { "context": "Workspace", "bindings": { "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::ToggleLeftSidebar", "cmd-shift-F": "project_search::Deploy", "cmd-k cmd-t": "theme_selector::Toggle", "cmd-k cmd-s": "zed::OpenKeymap", "cmd-t": "project_symbols::Toggle", "cmd-p": "file_finder::Toggle", "cmd-shift-P": "command_palette::Toggle", "cmd-shift-M": "diagnostics::Deploy", "cmd-shift-E": "project_panel::Toggle", "cmd-alt-s": "workspace::SaveAll" } }, // Bindings from Sublime Text { "context": "Editor", "bindings": { "ctrl-shift-K": "editor::DeleteLine", "cmd-shift-D": "editor::DuplicateLine", "cmd-shift-L": "editor::SplitSelectionIntoLines", "ctrl-cmd-up": "editor::MoveLineUp", "ctrl-cmd-down": "editor::MoveLineDown", "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": { "cmd-k cmd-left": "workspace::ActivatePreviousPane", "cmd-k cmd-right": "workspace::ActivateNextPane" } }, // Bindings from Atom { "context": "Pane", "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", "bindings": { "enter": "editor::ConfirmRename" } }, { "context": "Editor && showing_completions", "bindings": { "enter": "editor::ConfirmCompletion", "tab": "editor::ConfirmCompletion" } }, { "context": "Editor && showing_code_actions", "bindings": { "enter": "editor::ConfirmCodeAction" } }, // Custom bindings { "bindings": { "ctrl-alt-cmd-f": "workspace::FollowNextCollaborator", "cmd-alt-i": "zed::DebugElements" } }, { "context": "Editor", "bindings": { "alt-enter": "editor::OpenExcerpts" } }, { "context": "ProjectSearchBar", "bindings": { "cmd-enter": "project_search::SearchInNew" } }, { "context": "Workspace", "bindings": { "cmd-shift-C": "contacts_panel::Toggle", "cmd-shift-B": "workspace::ToggleRightSidebar" } }, { "context": "ProjectPanel", "bindings": { "left": "project_panel::CollapseSelectedEntry", "right": "project_panel::ExpandSelectedEntry", "cmd-x": "project_panel::Cut", "cmd-c": "project_panel::Copy", "cmd-v": "project_panel::Paste", "cmd-alt-c": "project_panel::CopyPath", "f2": "project_panel::Rename", "backspace": "project_panel::Delete" } }, { "context": "Terminal", "bindings": { // Overrides for global bindings, remove at your own risk: "up": "terminal::Up", "down": "terminal::Down", "escape": "terminal::Escape", "enter": "terminal::Enter", "ctrl-c": "terminal::CtrlC", // Useful terminal actions: "cmd-c": "terminal::Copy", "cmd-v": "terminal::Paste", "cmd-k": "terminal::Clear" } }, { "context": "ModalTerminal", "bindings": { "shift-escape": "terminal::DeployModal" } } ]