mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-28 09:54:33 +00:00
37a59d6b2e
Release Notes: - vim: Fixed `:` on the welcome screen
626 lines
23 KiB
JSON
626 lines
23 KiB
JSON
[
|
|
{
|
|
"context": "VimControl && !menu",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"i": ["vim::PushOperator", { "Object": { "around": false } }],
|
|
"a": ["vim::PushOperator", { "Object": { "around": true } }],
|
|
"h": "vim::Left",
|
|
"left": "vim::Left",
|
|
"backspace": "vim::Backspace",
|
|
"j": "vim::Down",
|
|
"down": "vim::Down",
|
|
"ctrl-j": "vim::Down",
|
|
"enter": "vim::NextLineStart",
|
|
"ctrl-m": "vim::NextLineStart",
|
|
"+": "vim::NextLineStart",
|
|
"-": "vim::PreviousLineStart",
|
|
"tab": "vim::Tab",
|
|
"shift-tab": "vim::Tab",
|
|
"k": "vim::Up",
|
|
"up": "vim::Up",
|
|
"l": "vim::Right",
|
|
"right": "vim::Right",
|
|
"space": "vim::Space",
|
|
"$": "vim::EndOfLine",
|
|
"end": "vim::EndOfLine",
|
|
"^": "vim::FirstNonWhitespace",
|
|
"_": "vim::StartOfLineDownward",
|
|
"g _": "vim::EndOfLineDownward",
|
|
"shift-g": "vim::EndOfDocument",
|
|
"{": "vim::StartOfParagraph",
|
|
"}": "vim::EndOfParagraph",
|
|
"(": "vim::SentenceBackward",
|
|
")": "vim::SentenceForward",
|
|
"|": "vim::GoToColumn",
|
|
// Word motions
|
|
"w": "vim::NextWordStart",
|
|
"e": "vim::NextWordEnd",
|
|
"b": "vim::PreviousWordStart",
|
|
"g e": "vim::PreviousWordEnd",
|
|
// Subword motions
|
|
// "w": "vim::NextSubwordStart",
|
|
// "b": "vim::PreviousSubwordStart",
|
|
// "e": "vim::NextSubwordEnd",
|
|
// "g e": "vim::PreviousSubwordEnd",
|
|
"shift-w": ["vim::NextWordStart", { "ignorePunctuation": true }],
|
|
"shift-e": ["vim::NextWordEnd", { "ignorePunctuation": true }],
|
|
"shift-b": ["vim::PreviousWordStart", { "ignorePunctuation": true }],
|
|
"g shift-e": ["vim::PreviousWordEnd", { "ignorePunctuation": true }],
|
|
"/": "vim::Search",
|
|
"g /": "pane::DeploySearch",
|
|
"?": ["vim::Search", { "backwards": true }],
|
|
"*": "vim::MoveToNext",
|
|
"#": "vim::MoveToPrev",
|
|
"n": "vim::MoveToNextMatch",
|
|
"shift-n": "vim::MoveToPrevMatch",
|
|
"%": "vim::Matching",
|
|
"f": ["vim::PushOperator", { "FindForward": { "before": false } }],
|
|
"t": ["vim::PushOperator", { "FindForward": { "before": true } }],
|
|
"shift-f": ["vim::PushOperator", { "FindBackward": { "after": false } }],
|
|
"shift-t": ["vim::PushOperator", { "FindBackward": { "after": true } }],
|
|
"m": ["vim::PushOperator", "Mark"],
|
|
"'": ["vim::PushOperator", { "Jump": { "line": true } }],
|
|
"`": ["vim::PushOperator", { "Jump": { "line": false } }],
|
|
";": "vim::RepeatFind",
|
|
",": "vim::RepeatFindReversed",
|
|
"ctrl-o": "pane::GoBack",
|
|
"ctrl-i": "pane::GoForward",
|
|
"ctrl-]": "editor::GoToDefinition",
|
|
"escape": ["vim::SwitchMode", "Normal"],
|
|
"ctrl-[": ["vim::SwitchMode", "Normal"],
|
|
"v": "vim::ToggleVisual",
|
|
"shift-v": "vim::ToggleVisualLine",
|
|
"ctrl-v": "vim::ToggleVisualBlock",
|
|
"ctrl-q": "vim::ToggleVisualBlock",
|
|
"shift-k": "editor::Hover",
|
|
"shift-r": "vim::ToggleReplace",
|
|
"0": "vim::StartOfLine",
|
|
"home": "vim::StartOfLine",
|
|
"ctrl-f": "vim::PageDown",
|
|
"pagedown": "vim::PageDown",
|
|
"ctrl-b": "vim::PageUp",
|
|
"pageup": "vim::PageUp",
|
|
"ctrl-d": "vim::ScrollDown",
|
|
"ctrl-u": "vim::ScrollUp",
|
|
"ctrl-e": "vim::LineDown",
|
|
"ctrl-y": "vim::LineUp",
|
|
// "g" commands
|
|
"g g": "vim::StartOfDocument",
|
|
"g h": "editor::Hover",
|
|
"g t": "pane::ActivateNextItem",
|
|
"g shift-t": "pane::ActivatePrevItem",
|
|
"g d": "editor::GoToDefinition",
|
|
"g shift-d": "editor::GoToDeclaration",
|
|
"g y": "editor::GoToTypeDefinition",
|
|
"g shift-i": "editor::GoToImplementation",
|
|
"g x": "editor::OpenUrl",
|
|
"g f": "editor::OpenFile",
|
|
"g n": "vim::SelectNextMatch",
|
|
"g shift-n": "vim::SelectPreviousMatch",
|
|
"g l": "vim::SelectNext",
|
|
"g shift-l": "vim::SelectPrevious",
|
|
"g >": ["editor::SelectNext", { "replace_newest": true }],
|
|
"g <": ["editor::SelectPrevious", { "replace_newest": true }],
|
|
"g a": "editor::SelectAllMatches",
|
|
"g s": "outline::Toggle",
|
|
"g shift-s": "project_symbols::Toggle",
|
|
"g .": "editor::ToggleCodeActions", // zed specific
|
|
"g shift-a": "editor::FindAllReferences", // zed specific
|
|
"g space": "editor::OpenExcerpts", // zed specific
|
|
"g *": ["vim::MoveToNext", { "partialWord": true }],
|
|
"g #": ["vim::MoveToPrev", { "partialWord": true }],
|
|
"g j": ["vim::Down", { "displayLines": true }],
|
|
"g down": ["vim::Down", { "displayLines": true }],
|
|
"g k": ["vim::Up", { "displayLines": true }],
|
|
"g up": ["vim::Up", { "displayLines": true }],
|
|
"g $": ["vim::EndOfLine", { "displayLines": true }],
|
|
"g end": ["vim::EndOfLine", { "displayLines": true }],
|
|
"g 0": ["vim::StartOfLine", { "displayLines": true }],
|
|
"g home": ["vim::StartOfLine", { "displayLines": true }],
|
|
"g ^": ["vim::FirstNonWhitespace", { "displayLines": true }],
|
|
"g v": "vim::RestoreVisualSelection",
|
|
"g ]": "editor::GoToDiagnostic",
|
|
"g [": "editor::GoToPrevDiagnostic",
|
|
"g i": "vim::InsertAtPrevious",
|
|
"g ,": "vim::ChangeListNewer",
|
|
"g ;": "vim::ChangeListOlder",
|
|
"shift-h": "vim::WindowTop",
|
|
"shift-m": "vim::WindowMiddle",
|
|
"shift-l": "vim::WindowBottom",
|
|
"q": "vim::ToggleRecord",
|
|
"shift-q": "vim::ReplayLastRecording",
|
|
"@": ["vim::PushOperator", "ReplayRegister"],
|
|
// z commands
|
|
"z enter": ["workspace::SendKeystrokes", "z t ^"],
|
|
"z -": ["workspace::SendKeystrokes", "z b ^"],
|
|
"z ^": ["workspace::SendKeystrokes", "shift-h k z b ^"],
|
|
"z +": ["workspace::SendKeystrokes", "shift-l j z t ^"],
|
|
"z t": "editor::ScrollCursorTop",
|
|
"z z": "editor::ScrollCursorCenter",
|
|
"z .": ["workspace::SendKeystrokes", "z z ^"],
|
|
"z b": "editor::ScrollCursorBottom",
|
|
"z a": "editor::ToggleFold",
|
|
"z shift-a": "editor::ToggleFoldRecursive",
|
|
"z c": "editor::Fold",
|
|
"z shift-c": "editor::FoldRecursive",
|
|
"z o": "editor::UnfoldLines",
|
|
"z shift-o": "editor::UnfoldRecursive",
|
|
"z f": "editor::FoldSelectedRanges",
|
|
"z shift-m": "editor::FoldAll",
|
|
"z shift-r": "editor::UnfoldAll",
|
|
"shift-z shift-q": ["pane::CloseActiveItem", { "saveIntent": "skip" }],
|
|
"shift-z shift-z": ["pane::CloseActiveItem", { "saveIntent": "saveAll" }],
|
|
// Count support
|
|
"1": ["vim::Number", 1],
|
|
"2": ["vim::Number", 2],
|
|
"3": ["vim::Number", 3],
|
|
"4": ["vim::Number", 4],
|
|
"5": ["vim::Number", 5],
|
|
"6": ["vim::Number", 6],
|
|
"7": ["vim::Number", 7],
|
|
"8": ["vim::Number", 8],
|
|
"9": ["vim::Number", 9],
|
|
"ctrl-w d": "editor::GoToDefinitionSplit",
|
|
"ctrl-w g d": "editor::GoToDefinitionSplit",
|
|
"ctrl-w shift-d": "editor::GoToTypeDefinitionSplit",
|
|
"ctrl-w g shift-d": "editor::GoToTypeDefinitionSplit",
|
|
"ctrl-w space": "editor::OpenExcerptsSplit",
|
|
"ctrl-w g space": "editor::OpenExcerptsSplit",
|
|
"ctrl-6": "pane::AlternateFile"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_mode == normal",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"escape": "editor::Cancel",
|
|
"ctrl-[": "editor::Cancel",
|
|
":": "command_palette::Toggle",
|
|
".": "vim::Repeat",
|
|
"c": ["vim::PushOperator", "Change"],
|
|
"shift-c": "vim::ChangeToEndOfLine",
|
|
"d": ["vim::PushOperator", "Delete"],
|
|
"shift-d": "vim::DeleteToEndOfLine",
|
|
"shift-j": "vim::JoinLines",
|
|
"y": ["vim::PushOperator", "Yank"],
|
|
"shift-y": "vim::YankLine",
|
|
"i": "vim::InsertBefore",
|
|
"shift-i": "vim::InsertFirstNonWhitespace",
|
|
"a": "vim::InsertAfter",
|
|
"shift-a": "vim::InsertEndOfLine",
|
|
"x": "vim::DeleteRight",
|
|
"shift-x": "vim::DeleteLeft",
|
|
"o": "vim::InsertLineBelow",
|
|
"shift-o": "vim::InsertLineAbove",
|
|
"~": "vim::ChangeCase",
|
|
"ctrl-a": "vim::Increment",
|
|
"ctrl-x": "vim::Decrement",
|
|
"p": "vim::Paste",
|
|
"shift-p": ["vim::Paste", { "before": true }],
|
|
"u": "vim::Undo",
|
|
"ctrl-r": "vim::Redo",
|
|
"r": ["vim::PushOperator", "Replace"],
|
|
"s": "vim::Substitute",
|
|
"shift-s": "vim::SubstituteLine",
|
|
">": ["vim::PushOperator", "Indent"],
|
|
"<": ["vim::PushOperator", "Outdent"],
|
|
"g u": ["vim::PushOperator", "Lowercase"],
|
|
"g shift-u": ["vim::PushOperator", "Uppercase"],
|
|
"g ~": ["vim::PushOperator", "OppositeCase"],
|
|
"\"": ["vim::PushOperator", "Register"],
|
|
"g q": ["vim::PushOperator", "Rewrap"],
|
|
"g w": ["vim::PushOperator", "Rewrap"],
|
|
"ctrl-pagedown": "pane::ActivateNextItem",
|
|
"ctrl-pageup": "pane::ActivatePrevItem",
|
|
"insert": "vim::InsertBefore",
|
|
// tree-sitter related commands
|
|
"[ x": "editor::SelectLargerSyntaxNode",
|
|
"] x": "editor::SelectSmallerSyntaxNode",
|
|
"] d": "editor::GoToDiagnostic",
|
|
"[ d": "editor::GoToPrevDiagnostic",
|
|
"] c": "editor::GoToHunk",
|
|
"[ c": "editor::GoToPrevHunk",
|
|
"g c": ["vim::PushOperator", "ToggleComments"]
|
|
}
|
|
},
|
|
{
|
|
"context": "VimControl && VimCount",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"0": ["vim::Number", 0],
|
|
":": "vim::CountCommand"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_mode == visual",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
":": "vim::VisualCommand",
|
|
"u": "vim::ConvertToLowerCase",
|
|
"shift-u": "vim::ConvertToUpperCase",
|
|
"o": "vim::OtherEnd",
|
|
"shift-o": "vim::OtherEnd",
|
|
"d": "vim::VisualDelete",
|
|
"x": "vim::VisualDelete",
|
|
"shift-d": "vim::VisualDeleteLine",
|
|
"shift-x": "vim::VisualDeleteLine",
|
|
"y": "vim::VisualYank",
|
|
"shift-y": "vim::VisualYank",
|
|
"p": "vim::Paste",
|
|
"shift-p": ["vim::Paste", { "preserveClipboard": true }],
|
|
"s": "vim::Substitute",
|
|
"shift-s": "vim::SubstituteLine",
|
|
"shift-r": "vim::SubstituteLine",
|
|
"c": "vim::Substitute",
|
|
"~": "vim::ChangeCase",
|
|
"*": ["vim::MoveToNext", { "partialWord": true }],
|
|
"#": ["vim::MoveToPrev", { "partialWord": true }],
|
|
"ctrl-a": "vim::Increment",
|
|
"ctrl-x": "vim::Decrement",
|
|
"g ctrl-a": ["vim::Increment", { "step": true }],
|
|
"g ctrl-x": ["vim::Decrement", { "step": true }],
|
|
"shift-i": "vim::InsertBefore",
|
|
"shift-a": "vim::InsertAfter",
|
|
"g shift-i": "vim::VisualInsertFirstNonWhiteSpace",
|
|
"g shift-a": "vim::VisualInsertEndOfLine",
|
|
"shift-j": "vim::JoinLines",
|
|
"r": ["vim::PushOperator", "Replace"],
|
|
"ctrl-c": ["vim::SwitchMode", "Normal"],
|
|
"escape": ["vim::SwitchMode", "Normal"],
|
|
"ctrl-[": ["vim::SwitchMode", "Normal"],
|
|
">": "vim::Indent",
|
|
"<": "vim::Outdent",
|
|
"i": ["vim::PushOperator", { "Object": { "around": false } }],
|
|
"a": ["vim::PushOperator", { "Object": { "around": true } }],
|
|
"g c": "vim::ToggleComments",
|
|
"g q": "vim::Rewrap",
|
|
"\"": ["vim::PushOperator", "Register"],
|
|
// tree-sitter related commands
|
|
"[ x": "editor::SelectLargerSyntaxNode",
|
|
"] x": "editor::SelectSmallerSyntaxNode"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_mode == insert",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"escape": "vim::NormalBefore",
|
|
"ctrl-c": "vim::NormalBefore",
|
|
"ctrl-[": "vim::NormalBefore",
|
|
"ctrl-x": null,
|
|
"ctrl-x ctrl-o": "editor::ShowCompletions",
|
|
"ctrl-x ctrl-a": "assistant::InlineAssist", // zed specific
|
|
"ctrl-x ctrl-c": "editor::ShowInlineCompletion", // zed specific
|
|
"ctrl-x ctrl-l": "editor::ToggleCodeActions", // zed specific
|
|
"ctrl-x ctrl-z": "editor::Cancel",
|
|
"ctrl-w": "editor::DeleteToPreviousWordStart",
|
|
"ctrl-u": "editor::DeleteToBeginningOfLine",
|
|
"ctrl-t": "vim::Indent",
|
|
"ctrl-d": "vim::Outdent",
|
|
"ctrl-k": ["vim::PushOperator", { "Digraph": {} }],
|
|
"ctrl-v": ["vim::PushOperator", { "Literal": {} }],
|
|
"ctrl-shift-v": "editor::Paste", // note: this is *very* similar to ctrl-v in vim, but ctrl-shift-v on linux is the typical shortcut for paste when ctrl-v is already in use.
|
|
"ctrl-q": ["vim::PushOperator", { "Literal": {} }],
|
|
"ctrl-shift-q": ["vim::PushOperator", { "Literal": {} }],
|
|
"ctrl-r": ["vim::PushOperator", "Register"],
|
|
"insert": "vim::ToggleReplace",
|
|
"ctrl-o": "vim::TemporaryNormal"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_mode == insert && !(showing_code_actions || showing_completions)",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"ctrl-p": "editor::ShowCompletions",
|
|
"ctrl-n": "editor::ShowCompletions"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_mode == replace",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"escape": "vim::NormalBefore",
|
|
"ctrl-c": "vim::NormalBefore",
|
|
"ctrl-[": "vim::NormalBefore",
|
|
"ctrl-k": ["vim::PushOperator", { "Digraph": {} }],
|
|
"ctrl-v": ["vim::PushOperator", { "Literal": {} }],
|
|
"ctrl-shift-v": "editor::Paste", // note: this is *very* similar to ctrl-v in vim, but ctrl-shift-v on linux is the typical shortcut for paste when ctrl-v is already in use.
|
|
"ctrl-q": ["vim::PushOperator", { "Literal": {} }],
|
|
"ctrl-shift-q": ["vim::PushOperator", { "Literal": {} }],
|
|
"backspace": "vim::UndoReplace",
|
|
"tab": "vim::Tab",
|
|
"enter": "vim::Enter",
|
|
"insert": "vim::InsertBefore"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_mode == waiting",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"tab": "vim::Tab",
|
|
"enter": "vim::Enter",
|
|
"escape": "vim::ClearOperators",
|
|
"ctrl-c": "vim::ClearOperators",
|
|
"ctrl-[": "vim::ClearOperators",
|
|
"ctrl-k": ["vim::PushOperator", { "Digraph": {} }],
|
|
"ctrl-v": ["vim::PushOperator", { "Literal": {} }],
|
|
"ctrl-q": ["vim::PushOperator", { "Literal": {} }]
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_mode == operator",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"escape": "vim::ClearOperators",
|
|
"ctrl-c": "vim::ClearOperators",
|
|
"ctrl-[": "vim::ClearOperators"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_operator == a || vim_operator == i || vim_operator == cs",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"w": "vim::Word",
|
|
"shift-w": ["vim::Word", { "ignorePunctuation": true }],
|
|
"t": "vim::Tag",
|
|
"s": "vim::Sentence",
|
|
"p": "vim::Paragraph",
|
|
"'": "vim::Quotes",
|
|
"`": "vim::BackQuotes",
|
|
"\"": "vim::DoubleQuotes",
|
|
"|": "vim::VerticalBars",
|
|
"(": "vim::Parentheses",
|
|
")": "vim::Parentheses",
|
|
"b": "vim::Parentheses",
|
|
"[": "vim::SquareBrackets",
|
|
"]": "vim::SquareBrackets",
|
|
"r": "vim::SquareBrackets",
|
|
"{": "vim::CurlyBrackets",
|
|
"}": "vim::CurlyBrackets",
|
|
"shift-b": "vim::CurlyBrackets",
|
|
"<": "vim::AngleBrackets",
|
|
">": "vim::AngleBrackets",
|
|
"a": "vim::Argument"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_operator == c",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"c": "vim::CurrentLine",
|
|
"d": "editor::Rename", // zed specific
|
|
"s": ["vim::PushOperator", { "ChangeSurrounds": {} }]
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_operator == d",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"d": "vim::CurrentLine",
|
|
"s": ["vim::PushOperator", "DeleteSurrounds"],
|
|
"o": "editor::ToggleHunkDiff", // "d o"
|
|
"p": "editor::RevertSelectedHunks" // "d p"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_operator == gu",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"g u": "vim::CurrentLine",
|
|
"u": "vim::CurrentLine"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_operator == gU",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"g shift-u": "vim::CurrentLine",
|
|
"shift-u": "vim::CurrentLine"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_operator == g~",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"g ~": "vim::CurrentLine",
|
|
"~": "vim::CurrentLine"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_operator == gq",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"g q": "vim::CurrentLine",
|
|
"q": "vim::CurrentLine",
|
|
"g w": "vim::CurrentLine",
|
|
"w": "vim::CurrentLine"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_operator == y",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"y": "vim::CurrentLine",
|
|
"s": ["vim::PushOperator", { "AddSurrounds": {} }]
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_operator == ys",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"s": "vim::CurrentLine"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_operator == >",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
">": "vim::CurrentLine"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_operator == <",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"<": "vim::CurrentLine"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_operator == gc",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"c": "vim::CurrentLine"
|
|
}
|
|
},
|
|
{
|
|
"context": "vim_mode == literal",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"ctrl-@": ["vim::Literal", ["ctrl-@", "\u0000"]],
|
|
"ctrl-a": ["vim::Literal", ["ctrl-a", "\u0001"]],
|
|
"ctrl-b": ["vim::Literal", ["ctrl-b", "\u0002"]],
|
|
"ctrl-c": ["vim::Literal", ["ctrl-c", "\u0003"]],
|
|
"ctrl-d": ["vim::Literal", ["ctrl-d", "\u0004"]],
|
|
"ctrl-e": ["vim::Literal", ["ctrl-e", "\u0005"]],
|
|
"ctrl-f": ["vim::Literal", ["ctrl-f", "\u0006"]],
|
|
"ctrl-g": ["vim::Literal", ["ctrl-g", "\u0007"]],
|
|
"ctrl-h": ["vim::Literal", ["ctrl-h", "\u0008"]],
|
|
"ctrl-i": ["vim::Literal", ["ctrl-i", "\u0009"]],
|
|
"ctrl-j": ["vim::Literal", ["ctrl-j", "\u000A"]],
|
|
"ctrl-k": ["vim::Literal", ["ctrl-k", "\u000B"]],
|
|
"ctrl-l": ["vim::Literal", ["ctrl-l", "\u000C"]],
|
|
"ctrl-m": ["vim::Literal", ["ctrl-m", "\u000D"]],
|
|
"ctrl-n": ["vim::Literal", ["ctrl-n", "\u000E"]],
|
|
"ctrl-o": ["vim::Literal", ["ctrl-o", "\u000F"]],
|
|
"ctrl-p": ["vim::Literal", ["ctrl-p", "\u0010"]],
|
|
"ctrl-q": ["vim::Literal", ["ctrl-q", "\u0011"]],
|
|
"ctrl-r": ["vim::Literal", ["ctrl-r", "\u0012"]],
|
|
"ctrl-s": ["vim::Literal", ["ctrl-s", "\u0013"]],
|
|
"ctrl-t": ["vim::Literal", ["ctrl-t", "\u0014"]],
|
|
"ctrl-u": ["vim::Literal", ["ctrl-u", "\u0015"]],
|
|
"ctrl-v": ["vim::Literal", ["ctrl-v", "\u0016"]],
|
|
"ctrl-w": ["vim::Literal", ["ctrl-w", "\u0017"]],
|
|
"ctrl-x": ["vim::Literal", ["ctrl-x", "\u0018"]],
|
|
"ctrl-y": ["vim::Literal", ["ctrl-y", "\u0019"]],
|
|
"ctrl-z": ["vim::Literal", ["ctrl-z", "\u001A"]],
|
|
"ctrl-[": ["vim::Literal", ["ctrl-[", "\u001B"]],
|
|
"ctrl-\\": ["vim::Literal", ["ctrl-\\", "\u001C"]],
|
|
"ctrl-]": ["vim::Literal", ["ctrl-]", "\u001D"]],
|
|
"ctrl-^": ["vim::Literal", ["ctrl-^", "\u001E"]],
|
|
"ctrl-_": ["vim::Literal", ["ctrl-_", "\u001F"]],
|
|
"escape": ["vim::Literal", ["escape", "\u001B"]],
|
|
"enter": ["vim::Literal", ["enter", "\u000D"]],
|
|
"tab": ["vim::Literal", ["tab", "\u0009"]],
|
|
// zed extensions:
|
|
"backspace": ["vim::Literal", ["backspace", "\u0008"]],
|
|
"delete": ["vim::Literal", ["delete", "\u007F"]]
|
|
}
|
|
},
|
|
{
|
|
"context": "BufferSearchBar && !in_replace",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"enter": "vim::SearchSubmit",
|
|
"escape": "buffer_search::Dismiss"
|
|
}
|
|
},
|
|
{
|
|
"context": "ProjectPanel || CollabPanel || OutlinePanel || ChatPanel || VimControl || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
// window related commands (ctrl-w X)
|
|
"ctrl-w": null,
|
|
"ctrl-w left": ["workspace::ActivatePaneInDirection", "Left"],
|
|
"ctrl-w right": ["workspace::ActivatePaneInDirection", "Right"],
|
|
"ctrl-w up": ["workspace::ActivatePaneInDirection", "Up"],
|
|
"ctrl-w down": ["workspace::ActivatePaneInDirection", "Down"],
|
|
"ctrl-w h": ["workspace::ActivatePaneInDirection", "Left"],
|
|
"ctrl-w l": ["workspace::ActivatePaneInDirection", "Right"],
|
|
"ctrl-w k": ["workspace::ActivatePaneInDirection", "Up"],
|
|
"ctrl-w j": ["workspace::ActivatePaneInDirection", "Down"],
|
|
"ctrl-w ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
|
|
"ctrl-w ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
|
|
"ctrl-w ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
|
|
"ctrl-w ctrl-j": ["workspace::ActivatePaneInDirection", "Down"],
|
|
"ctrl-w shift-left": ["workspace::SwapPaneInDirection", "Left"],
|
|
"ctrl-w shift-right": ["workspace::SwapPaneInDirection", "Right"],
|
|
"ctrl-w shift-up": ["workspace::SwapPaneInDirection", "Up"],
|
|
"ctrl-w shift-down": ["workspace::SwapPaneInDirection", "Down"],
|
|
"ctrl-w shift-h": ["workspace::SwapPaneInDirection", "Left"],
|
|
"ctrl-w shift-l": ["workspace::SwapPaneInDirection", "Right"],
|
|
"ctrl-w shift-k": ["workspace::SwapPaneInDirection", "Up"],
|
|
"ctrl-w shift-j": ["workspace::SwapPaneInDirection", "Down"],
|
|
"ctrl-w g t": "pane::ActivateNextItem",
|
|
"ctrl-w ctrl-g t": "pane::ActivateNextItem",
|
|
"ctrl-w g shift-t": "pane::ActivatePrevItem",
|
|
"ctrl-w ctrl-g shift-t": "pane::ActivatePrevItem",
|
|
"ctrl-w w": "workspace::ActivateNextPane",
|
|
"ctrl-w ctrl-w": "workspace::ActivateNextPane",
|
|
"ctrl-w p": "workspace::ActivatePreviousPane",
|
|
"ctrl-w ctrl-p": "workspace::ActivatePreviousPane",
|
|
"ctrl-w shift-w": "workspace::ActivatePreviousPane",
|
|
"ctrl-w ctrl-shift-w": "workspace::ActivatePreviousPane",
|
|
"ctrl-w v": "pane::SplitVertical",
|
|
"ctrl-w ctrl-v": "pane::SplitVertical",
|
|
"ctrl-w s": "pane::SplitHorizontal",
|
|
"ctrl-w shift-s": "pane::SplitHorizontal",
|
|
"ctrl-w ctrl-s": "pane::SplitHorizontal",
|
|
"ctrl-w c": "pane::CloseAllItems",
|
|
"ctrl-w ctrl-c": "pane::CloseAllItems",
|
|
"ctrl-w q": "pane::CloseAllItems",
|
|
"ctrl-w ctrl-q": "pane::CloseAllItems",
|
|
"ctrl-w o": "workspace::CloseInactiveTabsAndPanes",
|
|
"ctrl-w ctrl-o": "workspace::CloseInactiveTabsAndPanes",
|
|
"ctrl-w n": "workspace::NewFileSplitHorizontal",
|
|
"ctrl-w ctrl-n": "workspace::NewFileSplitHorizontal"
|
|
}
|
|
},
|
|
{
|
|
"context": "EmptyPane || SharedScreen || MarkdownPreview || KeyContextView || Welcome",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
":": "command_palette::Toggle",
|
|
"g /": "pane::DeploySearch"
|
|
}
|
|
},
|
|
{
|
|
// netrw compatibility
|
|
"context": "ProjectPanel && not_editing",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
":": "command_palette::Toggle",
|
|
"%": "project_panel::NewFile",
|
|
"/": "project_panel::NewSearchInDirectory",
|
|
"d": "project_panel::NewDirectory",
|
|
"enter": "project_panel::OpenPermanent",
|
|
"escape": "project_panel::ToggleFocus",
|
|
"h": "project_panel::CollapseSelectedEntry",
|
|
"j": "menu::SelectNext",
|
|
"k": "menu::SelectPrev",
|
|
"l": "project_panel::ExpandSelectedEntry",
|
|
"o": "project_panel::OpenPermanent",
|
|
"shift-d": "project_panel::Delete",
|
|
"shift-r": "project_panel::Rename",
|
|
"t": "project_panel::OpenPermanent",
|
|
"v": "project_panel::OpenPermanent",
|
|
"p": "project_panel::Open",
|
|
"x": "project_panel::RevealInFileManager",
|
|
"s": "project_panel::OpenWithSystem",
|
|
"shift-g": "menu::SelectLast",
|
|
"g g": "menu::SelectFirst",
|
|
"-": "project_panel::SelectParent",
|
|
"ctrl-6": "pane::AlternateFile"
|
|
}
|
|
},
|
|
{
|
|
"context": "OutlinePanel && not_editing",
|
|
"use_layout_keys": true,
|
|
"bindings": {
|
|
"j": "menu::SelectNext",
|
|
"k": "menu::SelectPrev",
|
|
"shift-g": "menu::SelectLast",
|
|
"g g": "menu::SelectFirst"
|
|
}
|
|
}
|
|
]
|