dots-of-war/eggs/zed/keymap.json

189 lines
5.6 KiB
JSON
Raw Normal View History

[
{
"context": "Pane",
"bindings": {
// unbind closing the tab with this
"ctrl-w": null,
"ctrl-w ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-w ctrl-j": ["workspace::ActivatePaneInDirection", "Down"],
"ctrl-w ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-w ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
"ctrl-shift-t": "pane::ReopenClosedItem",
"ctrl-o": "pane::GoBack",
"ctrl-i": "pane::GoForward"
// "shift-escape": null
}
},
{
"context": "EmptyPane",
"bindings": {
":": "command_palette::Toggle",
"space p": "file_finder::Toggle"
}
},
{
"context": "os == macos && Editor && VimControl && !VimWaiting && !menu",
"bindings": {
"cmd-d": "editor::SelectNext"
}
},
{
"bindings": {
"ctrl-alt-shift-p": "projects::OpenRecent",
"ctrl-alt-shift-o": "workspace::Open"
}
},
{
"context": "os == linux && Editor && VimControl && !VimWaiting && !menu",
"bindings": {
"ctrl-shift-d": "editor::SelectNext"
}
},
{
2024-12-04 21:34:30 +00:00
"context": "MarkdownPreview || EmptyPane || Editor && VimControl && !VimWaiting && !menu",
"bindings": {
2024-12-05 18:11:16 +00:00
"z space": "editor::FoldFunctionBodies",
"z enter": "editor::UnfoldAll",
"space b c": "pane::CloseActiveItem",
":": "command_palette::Toggle",
"space p": "file_finder::Toggle",
"space o": "pane::DeploySearch",
"space h": "pane::ActivatePrevItem",
"space l": "pane::ActivateNextItem",
"space c space": "editor::ToggleComments",
// go to search result
"g space": "editor::OpenExcerpts",
"space e j": "editor::ExpandExcerptsDown",
"space e k": "editor::ExpandExcerptsUp",
// multi-cursor
"cmd-shift-d": "editor::SelectPrevious",
"cmd-shift-l": "editor::SelectAllMatches",
"ctrl-j": "editor::AddSelectionBelow",
"ctrl-k": "editor::AddSelectionAbove",
"alt-d": "editor::SelectNext",
"alt-j": "editor::SelectAllMatches",
// lsp
"space m f": "editor::Format",
2024-12-16 17:19:49 +00:00
"space m s": "project_symbols::Toggle",
"space m g": "editor::GoToDefinition",
"space m d": "editor::Hover",
"space m n": "editor::Rename",
"space m r": "editor::FindAllReferences",
"space m t": "editor::GoToTypeDefinition",
"space m e": "editor::GoToDiagnostic",
"space m E": "editor::GoToPrevDiagnostic",
"space m v": "editor::ToggleCodeActions",
"space m o": "outline::Toggle",
2024-12-16 17:19:49 +00:00
"space m h": "editor::ShowSignatureHelp",
// diagnostics
"space e e": "diagnostics::Deploy",
"space e w": "diagnostics::ToggleWarnings",
// view
"space v n": "editor::ToggleLineNumbers",
"space v i": "editor::ToggleInlayHints",
// Git
"space g b": "editor::ToggleGitBlame"
}
},
{
"context": "Editor && vim_mode == normal && !VimWaiting && !menu",
"bindings": {}
},
{
"context": "Editor && vim_mode == insert",
"bindings": {
"ctrl-w": "editor::DeleteToPreviousWordStart"
}
},
{
"context": "os == linux && ((Editor && vim_mode == normal) || Terminal) && !VimWaiting && !menu",
"bindings": {
"ctrl-t ctrl-t": "terminal_panel::ToggleFocus",
"ctrl-t ctrl-n": "workspace::NewTerminal",
"ctrl-t ctrl-shift-n": "workspace::NewCenterTerminal",
"ctrl-t ctrl-h": "pane::ActivatePrevItem",
"ctrl-t ctrl-l": "pane::ActivateNextItem",
"ctrl-x ctrl-c": "pane::CloseActiveItem",
2024-12-14 12:32:26 +00:00
"ctrl-t ctrl-c": "pane::CloseActiveItem",
"alt-j": "workspace::ToggleBottomDock"
}
},
{
"context": "os == macos && ((Editor && vim_mode == normal) || Terminal) && !VimWaiting && !menu",
"bindings": {
"cmd-t cmd-t": "terminal_panel::ToggleFocus",
"cmd-t cmd-n": "workspace::NewTerminal",
"cmd-t cmd-shift-n": "workspace::NewCenterTerminal",
"cmd-t cmd-h": "pane::ActivatePrevItem",
"cmd-t cmd-l": "pane::ActivateNextItem",
"cmd-x cmd-c": "pane::CloseActiveItem"
}
},
{
"context": "os == linux && ((Editor && vim_mode == normal) || Terminal) && !VimWaiting && !menu",
"bindings": {
"alt-j": "workspace::ToggleBottomDock",
"alt-t alt-t": "terminal_panel::ToggleFocus",
"alt-t alt-n": "workspace::NewTerminal",
"alt-t alt-shift-n": "workspace::NewCenterTerminal",
"alt-t alt-h": "pane::ActivatePrevItem",
"alt-t alt-l": "pane::ActivateNextItem",
"alt-x alt-c": "pane::CloseActiveItem"
}
},
{
"context": "Editor && vim_mode == visual && !VimWaiting && !menu",
"bindings": {
"n": "editor::SelectLargerSyntaxNode",
"N": "editor::SelectSmallerSyntaxNode",
"m": "vim::SelectNext",
"M": "vim::SelectPrevious",
",": "editor::SplitSelectionIntoLines"
}
},
{
"context": "ProjectSearchBar",
"bindings": {
"space b c": "pane::CloseActiveItem",
"escape escape": "pane::CloseActiveItem"
}
},
// Panel stuff
{
"context": "Editor && VimControl && !VimWaiting && !menu || OutlinePanel || ProjectPanel || Assistant || EmptyPane",
"bindings": {
"space v h": "workspace::ToggleLeftDock",
"space v l": "workspace::ToggleRightDock",
"space v o": "outline_panel::ToggleFocus",
"space v p": "project_panel::ToggleFocus",
"space v a": "assistant::ToggleFocus"
}
},
{
"context": "OutlinePanel",
"bindings": {
"space l": "outline_panel::ToggleFocus"
}
},
{
"context": "ProjectPanel",
"bindings": {
"space l": "project_panel::ToggleFocus"
}
},
{
"context": "Assistant",
"bindings": {
"space h": "assistant::ToggleFocus"
}
}
]