1305 lines
45 KiB
JSON
1305 lines
45 KiB
JSON
[
|
|
// Standard macOS bindings
|
|
{
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"f4": "debugger::Start",
|
|
"shift-f5": "debugger::Stop",
|
|
"shift-cmd-f5": "debugger::RerunSession",
|
|
"f6": "debugger::Pause",
|
|
"f7": "debugger::StepOver",
|
|
"ctrl-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",
|
|
"cmd-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->": "agent::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::OpenSettings",
|
|
"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",
|
|
"cmd-alt-shift-n": "agent::ToggleNewThreadMenu",
|
|
"shift-alt-escape": "agent::ExpandMessageEditor",
|
|
"cmd->": "agent::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": "AgentPanel && external_agent_thread",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"cmd-n": "agent::NewExternalAgentThread",
|
|
"cmd-alt-t": "agent::NewThread"
|
|
}
|
|
},
|
|
{
|
|
"context": "MessageEditor && !Picker > Editor && !use_modifier_to_send",
|
|
"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": "MessageEditor && !Picker > Editor && use_modifier_to_send",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"cmd-enter": "agent::Chat",
|
|
"enter": "editor::Newline",
|
|
"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": "AcpThread > Editor && !use_modifier_to_send",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"enter": "agent::Chat",
|
|
"shift-ctrl-r": "agent::OpenAgentDiff",
|
|
"cmd-shift-y": "agent::KeepAll",
|
|
"cmd-shift-n": "agent::RejectAll"
|
|
}
|
|
},
|
|
{
|
|
"context": "AcpThread > Editor && use_modifier_to_send",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"cmd-enter": "agent::Chat",
|
|
"shift-ctrl-r": "agent::OpenAgentDiff",
|
|
"cmd-shift-y": "agent::KeepAll",
|
|
"cmd-shift-n": "agent::RejectAll"
|
|
}
|
|
},
|
|
{
|
|
"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::CloseOtherItems", { "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-k cmd-b": "editor::BlameHover",
|
|
"cmd-/": ["editor::ToggleComments", { "advance_downwards": false }],
|
|
"f8": ["editor::GoToDiagnostic", { "severity": { "min": "hint", "max": "error" } }],
|
|
"shift-f8": ["editor::GoToPreviousDiagnostic", { "severity": { "min": "hint", "max": "error" } }],
|
|
"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", // From Jetbrains
|
|
"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-k p": "editor::CopyPath",
|
|
"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 }],
|
|
"cmd-ctrl-b": "branches::OpenRecent",
|
|
"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",
|
|
// For 0px parameter, uses UI font size value.
|
|
"ctrl-alt-0": "workspace::ResetActiveDockSize",
|
|
"ctrl-alt--": ["workspace::DecreaseActiveDockSize", { "px": 0 }],
|
|
"ctrl-alt-=": ["workspace::IncreaseActiveDockSize", { "px": 0 }],
|
|
"ctrl-alt-)": "workspace::ResetOpenDocksSize",
|
|
"ctrl-alt-_": ["workspace::DecreaseOpenDocksSize", { "px": 0 }],
|
|
"ctrl-alt-+": ["workspace::IncreaseOpenDocksSize", { "px": 0 }],
|
|
"cmd-shift-f": "pane::DeploySearch",
|
|
"cmd-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],
|
|
"cmd-shift-t": "pane::ReopenClosedItem",
|
|
"cmd-k cmd-s": "zed::OpenKeymapEditor",
|
|
"cmd-k cmd-t": "theme_selector::Toggle",
|
|
"ctrl-alt-cmd-p": "settings_profile_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::Rerun",
|
|
"cmd-w": "workspace::CloseActiveDock"
|
|
}
|
|
},
|
|
{
|
|
"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": "zed::NoAction"
|
|
}
|
|
},
|
|
{
|
|
"context": "Workspace && debugger_stopped",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"f5": "debugger::Continue"
|
|
}
|
|
},
|
|
// Bindings from Sublime Text
|
|
{
|
|
"context": "Editor",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"cmd-u": "editor::UndoSelection",
|
|
"cmd-shift-u": "editor::RedoSelection",
|
|
"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"
|
|
}
|
|
},
|
|
{
|
|
"context": "Editor && showing_signature_help && !showing_completions",
|
|
"bindings": {
|
|
"up": "editor::SignatureHelpPrevious",
|
|
"down": "editor::SignatureHelpNext"
|
|
}
|
|
},
|
|
// 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",
|
|
"alt-d": "project_panel::CompareMarkedFiles",
|
|
"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",
|
|
"shift-space": "git::StageRange",
|
|
"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",
|
|
"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": "CommitEditor > 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",
|
|
"cmd-enter": "git::Commit",
|
|
"cmd-shift-enter": "git::Amend"
|
|
}
|
|
},
|
|
{
|
|
"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",
|
|
"left": "debugger::PreviousBreakpointProperty",
|
|
"right": "debugger::NextBreakpointProperty"
|
|
}
|
|
},
|
|
{
|
|
"context": "CollabPanel && not_editing",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"ctrl-backspace": "collab_panel::Remove",
|
|
"space": "menu::Confirm"
|
|
}
|
|
},
|
|
{
|
|
"context": "CollabPanel",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"alt-up": "collab_panel::MoveChannelUp",
|
|
"alt-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-f": "buffer_search::Deploy",
|
|
"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"], // ctrl-u: clear line
|
|
"alt-delete": ["terminal::SendText", "\u001bd"], // alt-d: delete word forward
|
|
"cmd-delete": ["terminal::SendText", "\u000b"], // ctrl-k: delete to end of line
|
|
"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": "OnboardingAiConfigurationModal",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"escape": "menu::Cancel"
|
|
}
|
|
},
|
|
{
|
|
"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"
|
|
}
|
|
},
|
|
{
|
|
"context": "MarkdownPreview",
|
|
"bindings": {
|
|
"pageup": "markdown::MovePageUp",
|
|
"pagedown": "markdown::MovePageDown"
|
|
}
|
|
},
|
|
{
|
|
"context": "KeymapEditor",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"cmd-f": "search::FocusSearch",
|
|
"cmd-alt-f": "keymap_editor::ToggleKeystrokeSearch",
|
|
"cmd-alt-c": "keymap_editor::ToggleConflictFilter",
|
|
"enter": "keymap_editor::EditBinding",
|
|
"alt-enter": "keymap_editor::CreateBinding",
|
|
"cmd-c": "keymap_editor::CopyAction",
|
|
"cmd-shift-c": "keymap_editor::CopyContext",
|
|
"cmd-t": "keymap_editor::ShowMatchingKeybinds"
|
|
}
|
|
},
|
|
{
|
|
"context": "KeystrokeInput",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"enter": "keystroke_input::StartRecording",
|
|
"escape escape escape": "keystroke_input::StopRecording",
|
|
"delete": "keystroke_input::ClearKeystrokes"
|
|
}
|
|
},
|
|
{
|
|
"context": "KeybindEditorModal",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"cmd-enter": "menu::Confirm",
|
|
"escape": "menu::Cancel"
|
|
}
|
|
},
|
|
{
|
|
"context": "KeybindEditorModal > Editor",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"up": "menu::SelectPrevious",
|
|
"down": "menu::SelectNext"
|
|
}
|
|
},
|
|
{
|
|
"context": "Onboarding",
|
|
"use_key_equivalents": true,
|
|
"bindings": {
|
|
"cmd-1": "onboarding::ActivateBasicsPage",
|
|
"cmd-2": "onboarding::ActivateEditingPage",
|
|
"cmd-3": "onboarding::ActivateAISetupPage",
|
|
"cmd-escape": "onboarding::Finish",
|
|
"alt-tab": "onboarding::SignIn",
|
|
"alt-shift-a": "onboarding::OpenAccount"
|
|
}
|
|
}
|
|
]
|