dotfiles/.config/zed/keymap.json
2026-03-08 18:15:34 +02:00

107 lines
3.8 KiB
JSON

// Zed keymap
//
// This carries over the Neovim shortcuts that map cleanly onto Zed.
// Leader mappings use Zed's Vim mode sequence support.
[
{
"context": "Editor && !menu && vim_mode == normal",
"bindings": {
"ctrl-s": "workspace::SaveAll",
"ctrl-q": "pane::CloseActiveItem",
"tab": "pane::ActivateNextItem",
"shift-tab": "pane::ActivatePreviousItem",
"ctrl-h": "vim::ToggleProjectPanelFocus",
"ctrl-j": "workspace::ActivatePaneDown",
"ctrl-k": "workspace::ActivatePaneUp",
"ctrl-l": "workspace::ActivatePaneRight",
"shift-k": "editor::Hover",
"alt-j": "editor::MoveLineDown",
"alt-k": "editor::MoveLineUp",
"[ d": "editor::GoToPreviousDiagnostic",
"] d": "editor::GoToDiagnostic",
"g d": "editor::GoToDefinition",
"g i": "editor::GoToImplementation",
"g t": "editor::GoToTypeDefinition",
"g shift-d": "editor::GoToDeclaration",
"g shift-r": "editor::FindAllReferences"
}
},
{
"context": "ProjectPanel",
"bindings": {
"ctrl-h": "project_panel::ToggleFocus",
"ctrl-l": "project_panel::ToggleFocus",
"o": "project_panel::Open"
}
},
{
"context": "Editor && !menu && vim_mode == visual",
"bindings": {
"alt-j": "editor::MoveLineDown",
"alt-k": "editor::MoveLineUp",
"space c a": "editor::ToggleCodeActions",
"space g h": "vim::StartOfLine",
"space g l": "vim::EndOfLine",
"space s t": "editor::SortLinesCaseSensitive",
"space ~": "editor::ToggleCase"
}
},
{
"context": "Editor && !menu && vim_mode == normal",
"bindings": {
"space space": "tab_switcher::Toggle",
"space tab": "tab_switcher::Toggle",
"space /": "buffer_search::Deploy",
"space +": "vim::Increment",
"space -": "vim::Decrement",
"space b": "workspace::NewFile",
"space c a": "editor::ToggleCodeActions",
"space c f": "editor::Format",
"space d b": "editor::ToggleBreakpoint",
"space d c": "debugger::Continue",
"space d f": "editor::Hover",
"space d i": "debugger::StepInto",
"space d o": "debugger::StepOut",
"space d p": "debugger::Pause",
"space d r": "debugger::Rerun",
"space d shift-o": "debugger::StepOver",
"space d t": "debugger::Stop",
"space d u": "debug_panel::ToggleFocus",
"space e": "project_panel::ToggleFocus",
"space g b": "git::Branch",
"space g c f": "git::FileHistory",
"space g h": "vim::StartOfLine",
"space g l": "vim::EndOfLine",
"space g s": "git::Diff",
"space h": "pane::SplitHorizontal",
"space l g": "git_panel::ToggleFocus",
"space l w": "editor::ToggleSoftWrap",
"space m p": "editor::Format",
"space q": "diagnostics::Deploy",
"space q t": "pane::CloseOtherItems",
"space r n": "editor::Rename",
"space r s": "editor::RestartLanguageServer",
"space s /": "workspace::NewSearch",
"space s a": "workspace::SaveAll",
"space s b": "tab_switcher::Toggle",
"space s d": "diagnostics::Deploy",
"space s d s": "project_symbols::Toggle",
"space s f": "file_finder::Toggle",
"space s g": "workspace::NewSearch",
"space s n": "workspace::SaveWithoutFormat",
"space shift-d": "diagnostics::DeployCurrentFile",
"space t o": "terminal_panel::ToggleFocus",
"space t r": "task::Rerun",
"space t s": "zed::OpenTasks",
"space t t": "editor::SpawnNearestTask",
"space u d": "editor::ToggleInlineDiagnostics",
"space v": "pane::SplitVertical",
"space w h": "workspace::ActivatePaneLeft",
"space w j": "workspace::ActivatePaneDown",
"space w k": "workspace::ActivatePaneUp",
"space w l": "workspace::ActivatePaneRight",
"space w p": "workspace::ActivatePreviousPane",
"space x": "pane::CloseActiveItem"
}
}
]