home/.config/zed/keymap.json

141 lines
3.9 KiB
JSON
Raw Normal View History

2025-01-09 04:46:45 +01:00
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
[
{
"bindings": {
2025-01-12 18:04:33 +01:00
"shift-tab": "menu::SelectPrev",
"tab": "menu::SelectNext",
"alt-c": "pane::CloseActiveItem",
"ctrl-shift-w": null,
"ctrl-q": null,
"ctrl-h": [
"workspace::ActivatePaneInDirection",
"Left"
],
"ctrl-l": [
"workspace::ActivatePaneInDirection",
"Right"
],
"ctrl-k": [
"workspace::ActivatePaneInDirection",
"Up"
],
"ctrl-j": [
"workspace::ActivatePaneInDirection",
"Down"
],
2025-01-09 04:46:45 +01:00
}
},
{
2025-01-12 18:04:33 +01:00
"context": "Workspace",
2025-01-09 04:46:45 +01:00
"bindings": {
2025-01-12 18:04:33 +01:00
"f5": "workspace::ToggleLeftDock",
"alt-v": "terminal_panel::ToggleFocus",
2025-01-09 04:46:45 +01:00
}
},
{
2025-01-12 18:04:33 +01:00
"context": "menu",
2025-01-09 04:46:45 +01:00
"bindings": {
"shift-tab": "menu::SelectPrev",
2025-01-12 18:04:33 +01:00
"tab": "menu::SelectNext",
"f4": "menu::SelectPrev",
"f6": "menu::SelectNext"
2025-01-09 04:46:45 +01:00
}
},
{
"context": "Terminal",
"bindings": {
"alt-v": "workspace::ToggleBottomDock",
"ctrl-w": "terminal::ToggleViMode"
}
},
{
2025-01-12 18:04:33 +01:00
"context": "VimControl && !menu",
2025-01-09 04:46:45 +01:00
"bindings": {
"; f s": "outline::Toggle",
"; f w": "workspace::NewSearch",
"; f t": "theme_selector::Toggle",
2025-01-12 18:04:33 +01:00
"; f f": "file_finder::Toggle",
2025-01-09 04:46:45 +01:00
"L": "vim::EndOfLine",
"H": "vim::StartOfLine",
"left": "editor::TabPrev",
"right": "editor::Indent",
"space v": "editor::ToggleComments",
"alt-j": "vim::ScrollDown",
"alt-k": "vim::ScrollUp",
"up": "editor::MoveLineUp",
"down": "editor::MoveLineDown",
"space c a": "editor::ToggleCodeActions",
"space y": "editor::Copy",
"space p": "editor::Paste",
"tab": "pane::ActivateNextItem",
"shift-tab": "pane::ActivatePrevItem",
2025-01-12 18:04:33 +01:00
"space \"": "pane::SplitRight",
2025-01-09 04:46:45 +01:00
"space %": "pane::SplitHorizontal",
"space c r": "editor::Rename",
2025-01-12 18:04:33 +01:00
"space c t r": "diagnostics::Deploy",
"#": [
"vim::PushOperator",
{
"Jump": {
"line": true
}
}
],
2025-01-09 04:46:45 +01:00
}
},
{
"context": "vim_mode == normal",
"bindings": {
"space g g": [
"task::Spawn",
{
"task_name": "lazygit",
"reveal_target": "center"
}
]
}
},
{
"context": "vim_mode == insert",
"bindings": {
"ctrl-l": "vim::Right",
"ctrl-h": "vim::Left",
"ctrl-j": "vim::Down",
"ctrl-k": "vim::Up",
}
},
{
"context": "Editor && (showing_code_actions || showing_completions)",
"bindings": {
"shift-tab": "editor::ContextMenuPrev",
"tab": "editor::ContextMenuNext",
}
},
2025-01-12 18:04:33 +01:00
{
"context": "ProjectPanel && not_editing",
"bindings": {
"n": "project_panel::NewFile",
"N": "project_panel::NewDirectory",
"r": "project_panel::Rename",
"d": [
"project_panel::Trash",
{
"skip_prompt": false
}
],
"D": [
"project_panel::Delete",
{
"skip_prompt": false
}
],
}
},
2025-01-09 04:46:45 +01:00
]