[ { "context": "Editor && mode == full", "bindings": { "cmd-l": "assistant::QuoteSelection" } }, { "context": "ConversationEditor > Editor", "bindings": { "cmd-l": "assistant::QuoteSelection" } }, { "context": "Editor && (vim_mode == normal || vim_mode == visual) && !VimWaiting && !menu", "bindings": { // put key-bindings here if you want them to work in normal & visual mode // Git ", g h d": "editor::ToggleSelectedDiffHunks", ", g h r": "git::Restore", // Toggle inlay hints ", t i": "editor::ToggleInlayHints", // Toggle soft wrap ", u w": "editor::ToggleSoftWrap", // NOTE: Toggle Zen mode, not fully working yet ", c z": "workspace::ToggleCenteredLayout", // Open markdown preview ", m p": "markdown::OpenPreview", ", m P": "markdown::OpenPreviewToTheSide", // Open recent project ", f p": "projects::OpenRecent", // Search word under cursor ", s w": "pane::DeploySearch", // Chat with AI ", a c": "assistant::ToggleFocus", // Go to file with `gf` "g f": "editor::OpenExcerpts" } }, { "context": "Editor && vim_mode == normal && !VimWaiting && !menu", "bindings": { // put key-bindings here if you want them to work only in normal mode // Window movement bindings // Ctrl jklk to move between panes "ctrl-h": "workspace::ActivatePaneLeft", "ctrl-l": "workspace::ActivatePaneRight", "ctrl-k": "workspace::ActivatePaneUp", "ctrl-j": "workspace::ActivatePaneDown", // +LSP ", c a": "editor::ToggleCodeActions", ", .": "editor::ToggleCodeActions", ", c r": "editor::Rename", "g d": "editor::GoToDefinition", "g D": "editor::GoToDefinitionSplit", "g i": "editor::GoToImplementation", "g I": "editor::GoToImplementationSplit", "g t": "editor::GoToTypeDefinition", "g T": "editor::GoToTypeDefinitionSplit", "g r": "editor::FindAllReferences", "] d": "editor::GoToDiagnostic", "[ d": "editor::GoToPreviousDiagnostic", // TODO: Go to next/prev error "] e": "editor::GoToDiagnostic", "[ e": "editor::GoToPreviousDiagnostic", // Symbol search "s s": "outline::Toggle", "s S": "project_symbols::Toggle", // Diagnostic ", x x": "diagnostics::Deploy", // +Git // Git prev/next hunk "] h": "editor::GoToHunk", "[ h": "editor::GoToPreviousHunk", // TODO: git diff is not ready yet, refer https://github.com/zed-industries/zed/issues/8665#issuecomment-2194000497 // + Buffers // Switch between buffers "shift-h": "pane::ActivatePreviousItem", "shift-l": "pane::ActivateNextItem", // Close active panel "shift-q": "pane::CloseActiveItem", "ctrl-q": "pane::CloseActiveItem", ", b d": "pane::CloseActiveItem", // Close other items ", b o": "pane::CloseInactiveItems", // Save file "ctrl-s": "workspace::Save", // File finder ", space": "file_finder::Toggle", // Project search ", /": "pane::DeploySearch", // TODO: Open other files // Show project panel with current file ", e": "pane::RevealInProjectPanel" } }, // Empty pane, set of keybindings that are available when there is no active editor { "context": "EmptyPane || SharedScreen", "bindings": { // Open file finder ", space": "file_finder::Toggle", // Open recent project ", f p": "projects::OpenRecent" } }, // Comment code { "context": "Editor && vim_mode == visual && !VimWaiting && !menu", "bindings": { // visual, visual line & visual block modes "g c": "editor::ToggleComments" } }, // Rename { "context": "Editor && vim_operator == c", "bindings": { "c": "vim::CurrentLine", "r": "editor::Rename" // zed specific } }, // Code Action { "context": "Editor && vim_operator == c", "bindings": { "c": "vim::CurrentLine", "a": "editor::ToggleCodeActions" // zed specific } }, // Toggle terminal { "context": "Workspace", "bindings": { "ctrl-\\": "terminal_panel::ToggleFocus" } }, { "context": "Terminal", "bindings": { "ctrl-h": "workspace::ActivatePaneLeft", "ctrl-l": "workspace::ActivatePaneRight", "ctrl-k": "workspace::ActivatePaneUp", "ctrl-j": "workspace::ActivatePaneDown" } }, // File panel (netrw) { "context": "ProjectPanel && not_editing", "bindings": { "a": "project_panel::NewFile", "A": "project_panel::NewDirectory", "r": "project_panel::Rename", "d": "project_panel::Delete", "x": "project_panel::Cut", "c": "project_panel::Copy", "p": "project_panel::Paste", // Close project panel as project file panel on the right "q": "workspace::ToggleRightDock", ", e": "workspace::ToggleRightDock", // Navigate between panel "ctrl-h": "workspace::ActivatePaneLeft", "ctrl-l": "workspace::ActivatePaneRight", "ctrl-k": "workspace::ActivatePaneUp", "ctrl-j": "workspace::ActivatePaneDown" } }, // Panel nagivation { "context": "Dock", "bindings": { "ctrl-w h": "workspace::ActivatePaneLeft", "ctrl-w l": "workspace::ActivatePaneRight", "ctrl-w k": "workspace::ActivatePaneUp", "ctrl-w j": "workspace::ActivatePaneDown" } }, // Sneak motion, refer https://github.com/zed-industries/zed/pull/22793/files#diff-90c0cb07588e2f309c31f0bb17096728b8f4e0bad71f3152d4d81ca867321c68 { "context": "vim_mode == normal || vim_mode == visual", "bindings": { "s": ["vim::PushSneak", {}], "S": ["vim::PushSneakBackward", {}] } } // Subword motion is not working really nice with `ciw`, disable for now // { // "context": "VimControl && !menu", // "bindings": { // "w": "vim::NextSubwordStart", // "b": "vim::PreviousSubwordStart", // "e": "vim::NextSubwordEnd", // "g e": "vim::PreviousSubwordEnd" // } // } ]