-
-
Save coqanklazy/43bec4709bcfc768714342596152fbeb to your computer and use it in GitHub Desktop.
zed keymap.json with same lazyvim keymaps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| // Terminal | |
| { | |
| "context": "Workspace", | |
| "bindings": { | |
| "alt-`": "workspace::ToggleBottomDock" | |
| } | |
| }, | |
| { | |
| "context": "Editor && vim_mode == insert", | |
| "bindings": { | |
| "j k": "vim::NormalBefore" | |
| } | |
| }, | |
| { | |
| "context": "Dock || Terminal || Editor", | |
| "bindings": { | |
| // Window's motions | |
| "ctrl-h": "workspace::ActivatePaneLeft", | |
| "ctrl-l": "workspace::ActivatePaneRight", | |
| "ctrl-k": "workspace::ActivatePaneUp", | |
| "ctrl-j": "workspace::ActivatePaneDown" | |
| } | |
| }, | |
| { | |
| "context": "AgentPanel", | |
| "bindings": { | |
| "ctrl-\\": "workspace::ToggleLeftDock" | |
| } | |
| }, | |
| // File panel (netrw) | |
| { | |
| "context": "ProjectPanel && not_editing", | |
| "bindings": { | |
| "a": "project_panel::NewFile", | |
| "A": "project_panel::NewDirectory", | |
| "r": "project_panel::Rename", | |
| "d": "project_panel::Delete", | |
| "x": "project_panel::Cut", | |
| "c": "project_panel::Copy", | |
| "p": "project_panel::Paste", | |
| // Close project panel as project file panel on the right | |
| "q": "workspace::ToggleLeftDock", | |
| "space e": "workspace::ToggleRightDock", | |
| ":": "command_palette::Toggle", | |
| "%": "project_panel::NewFile", | |
| "/": "project_panel::NewSearchInDirectory", | |
| "enter": "project_panel::OpenPermanent", | |
| "escape": "project_panel::ToggleFocus", | |
| "h": "project_panel::CollapseSelectedEntry", | |
| "j": "menu::SelectNext", | |
| "k": "menu::SelectPrevious", | |
| "l": "project_panel::ExpandSelectedEntry", | |
| "shift-d": "project_panel::Delete", | |
| "shift-r": "project_panel::Rename", | |
| "v": "project_panel::OpenSplitVertical", | |
| "o": "project_panel::OpenSplitHorizontal", | |
| "shift-g": "menu::SelectLast", | |
| "g g": "menu::SelectFirst", | |
| "-": "project_panel::SelectParent", | |
| "ctrl-6": "pane::AlternateFile" | |
| } | |
| }, | |
| // Empty pane, set of keybindings that are available when there is no active editor | |
| { | |
| "context": "EmptyPane || SharedScreen", | |
| "bindings": { | |
| // Open file finder | |
| "space space": "file_finder::Toggle", | |
| // New file | |
| "space f n": "workspace::NewFile", | |
| // Open recent project | |
| "space f p": "projects::OpenRecent", | |
| // Search in all the files | |
| "space s g": "workspace::NewSearch" | |
| } | |
| }, | |
| { | |
| "context": "Editor && VimControl && !VimWaiting && !menu", | |
| "bindings": { | |
| // Refactoring | |
| "space r n": "editor::Rename", | |
| // go to symbols | |
| "space c s": "project_symbols::Toggle", | |
| // Chat with AI | |
| "space a a": "assistant::ToggleFocus", | |
| "ctrl-\\": "workspace::ToggleLeftDock", | |
| "space a e": "assistant::InlineAssist", | |
| "space a t": "workspace::ToggleRightDock", | |
| // Git | |
| "space g g": [ | |
| "task::Spawn", | |
| { | |
| "task_name": "lazygit" | |
| } | |
| ], | |
| "space g h d": "editor::ExpandAllDiffHunks", | |
| "space g h D": "git::Diff", | |
| "space g h r": "git::Restore", | |
| "space g h R": "git::RestoreFile", | |
| // Toggle inlay hints | |
| "space u i": "editor::ToggleInlayHints", | |
| // Toggle soft wrap | |
| "space u w": "editor::ToggleSoftWrap", | |
| // Open markdown preview | |
| "space m p": "markdown::OpenPreview", | |
| "space m P": "markdown::OpenPreviewToTheSide", | |
| // Open recent project | |
| "space f p": "projects::OpenRecent", | |
| // Search word under cursor in current pane | |
| "space s w": "buffer_search::Deploy", | |
| // Search word under cursor in all panes | |
| "space s W": "pane::DeploySearch", | |
| // Tab things. Almost as good as harpoon. | |
| "space 1": ["pane::ActivateItem", 0], | |
| "space 2": ["pane::ActivateItem", 1], | |
| "space 3": ["pane::ActivateItem", 2], | |
| "space 4": ["pane::ActivateItem", 3], | |
| "space 5": ["pane::ActivateItem", 4], | |
| "space 6": ["pane::ActivateItem", 5], | |
| "space 7": ["pane::ActivateItem", 6], | |
| "space 8": ["pane::ActivateItem", 7], | |
| "space 9": ["pane::ActivateItem", 8], | |
| "space 0": "pane::ActivateLastItem", | |
| "] b": "pane::ActivateNextItem", | |
| "[ b": "pane::ActivatePreviousItem", | |
| "space ,": "tab_switcher::Toggle", | |
| // Jump to the previous location | |
| "space b b": "pane::AlternateFile", | |
| // Close buffer | |
| "space b d": "pane::CloseActiveItem", | |
| // Close inactive buffers | |
| "space b q": "pane::CloseInactiveItems", | |
| "space b o": "pane::CloseInactiveItems", | |
| // New file | |
| "space b n": "workspace::NewFile", | |
| // Search in the current buffer | |
| "space s b": "vim::Search", | |
| // Search in all the files | |
| "space s g": "workspace::NewSearch", | |
| "space f n": "workspace::NewFile", | |
| // Search | |
| "space /": "workspace::NewSearch", | |
| // Git | |
| "space g b": "git::Blame", | |
| // LSP & Code actions | |
| "space q": "diagnostics::DeployCurrentFile", | |
| "space c a": "editor::ToggleCodeActions", | |
| "space s d": "diagnostics::Deploy", | |
| "space s s": "outline::Toggle", | |
| // Format | |
| "space c f": "editor::Format", | |
| // File explorer | |
| "space e": "workspace::ToggleRightDock", | |
| // Telescope | |
| "space f f": "file_finder::Toggle", | |
| "space space": "file_finder::Toggle", | |
| // Terminal | |
| "space t": "workspace::ToggleBottomDock", | |
| // Windows management | |
| // "space w s": "pane::SplitDown", | |
| // "space w v": "pane::SplitRight", | |
| // "space -": "pane::SplitDown", | |
| // "space |": "pane::SplitRight", | |
| "space w c": "pane::CloseAllItems", | |
| "space w d": "pane::CloseAllItems", | |
| // Jump to hunks | |
| "] h": "editor::GoToHunk", | |
| "[ h": "editor::GoToPreviousHunk", | |
| "] c": "editor::GoToHunk", | |
| "[ c": "editor::GoToPreviousHunk", | |
| // Jump to diagnostic | |
| "] d": "editor::GoToDiagnostic", | |
| "[ d": "editor::GoToPreviousDiagnostic", | |
| "] e": "editor::GoToDiagnostic", | |
| "[ e": "editor::GoToPreviousDiagnostic", | |
| // Excerpts | |
| "] q": "editor::MoveToStartOfNextExcerpt", | |
| "[ q": "editor::MoveToStartOfExcerpt", | |
| // split | |
| "space v": "pane::SplitVertical", | |
| "space h": "pane::SplitHorizontal" | |
| } | |
| }, | |
| { | |
| "context": "(((Editor && vim_mode == visual) && !VimWaiting) && !VimObject)", | |
| "bindings": { | |
| // Line's Motions | |
| "shift-k": "editor::MoveLineUp" | |
| } | |
| }, | |
| // Center the cursor on the screen when scrolling and find all references | |
| { | |
| "context": "VimControl && !menu", | |
| "bindings": { | |
| "ctrl-d": ["workspace::SendKeystrokes", "ctrl-d z z"], | |
| "ctrl-u": ["workspace::SendKeystrokes", "ctrl-u z z"], | |
| "ctrl-a": ["workspace::SendKeystrokes", "g g shift-v G"], | |
| // "shift-j": ["workspace::SendKeystrokes", "] e"], | |
| "n": ["workspace::SendKeystrokes", "n z z z v"], | |
| "shift-n": ["workspace::SendKeystrokes", "shift-n z z z v"], | |
| "space p": ["workspace::SendKeystrokes", "\" _ d P"], | |
| "c": ["workspace::SendKeystrokes", "\" _ c"], | |
| "C": ["workspace::SendKeystrokes", "\" _ C"], | |
| "ctrl-w": "pane::CloseActiveItem", | |
| "g r": "editor::FindAllReferences" | |
| } | |
| }, | |
| { | |
| "context": "VimControl && !menu && vim_mode == normal", | |
| "bindings": { | |
| "shift-g": ["workspace::SendKeystrokes", "shift-g z z"] | |
| } | |
| }, | |
| { | |
| "context": "vim_operator == d", | |
| "bindings": { | |
| "o": "editor::ExpandAllDiffHunks", | |
| "r": "git::Restore" | |
| } | |
| }, | |
| { | |
| "context": "vim_operator == a || vim_operator == i || vim_operator == cs", | |
| "bindings": { | |
| "b": "vim::AnyBrackets" | |
| } | |
| }, | |
| // vim sneak | |
| { | |
| "context": "vim_mode == normal || vim_mode == visual", | |
| "bindings": { | |
| "s": "vim::PushSneak", | |
| "shift-s": "vim::PushSneakBackward" | |
| } | |
| }, | |
| // visual mode exchanges && vim surround | |
| { | |
| "context": "vim_mode == visual", | |
| "bindings": { | |
| "shift-x": "vim::Exchange", | |
| "space s": "vim::PushAddSurrounds" | |
| } | |
| }, | |
| { | |
| "context": "(VimControl && !menu)", | |
| "bindings": { | |
| "shift-h": "vim::FirstNonWhitespace", | |
| "shift-l": "vim::EndOfLine" | |
| } | |
| }, | |
| { | |
| "context": "vim_mode == insert", | |
| "bindings": { | |
| "ctrl-v": "editor::Paste", | |
| "ctrl-s": "workspace::Save", | |
| "ctrl-k s": "workspace::SaveAll" | |
| } | |
| }, | |
| { | |
| "context": "vim_mode == visual", | |
| "bindings": { | |
| "ctrl-c": "editor::Copy" | |
| } | |
| }, | |
| // { | |
| // "context": "((VimControl && !menu) || (!Editor && !Terminal))", | |
| // "bindings": { | |
| // "space b d": "pane::CloseActiveItem" | |
| // } | |
| // }, | |
| { | |
| "context": "Pane", | |
| "bindings": { | |
| "alt-k": "pane::SplitUp", | |
| "alt-h": "pane::SplitLeft", | |
| "alt-j": "pane::SplitDown", | |
| "alt-l": "pane::SplitRight" | |
| } | |
| }, | |
| { | |
| "context": "((VimControl && !menu) || (!Editor && !Terminal))", | |
| "bindings": { | |
| "alt-shift-l": "vim::ResizePaneRight", | |
| "alt-shift-h": "vim::ResizePaneLeft", | |
| "alt-shift-k": "vim::ResizePaneUp", | |
| "alt-shift-j": "vim::ResizePaneDown" | |
| } | |
| }, | |
| { | |
| "context": "(VimControl && !menu)", | |
| "bindings": { | |
| "ctrl-b": null | |
| } | |
| }, | |
| { | |
| "context": "(VimControl && !menu)", | |
| "bindings": { | |
| "ctrl-g": "vim::SelectNext" | |
| } | |
| }, | |
| { | |
| "context": "(VimControl && !menu)", | |
| "bindings": { | |
| "ctrl-shift-g": "vim::SelectPrevious" | |
| } | |
| }, | |
| // In VimScript, this would look like this: | |
| // set whichwrap+=<,>,[,],h,l | |
| { | |
| "context": "VimControl && !menu", | |
| "bindings": { | |
| "h": "vim::WrappingLeft", | |
| "l": "vim::WrappingRight" | |
| } | |
| }, | |
| { | |
| "context": "((os != macos && Editor) && edit_prediction_conflict)", | |
| "bindings": { | |
| "alt-l": null | |
| } | |
| }, | |
| { | |
| "context": "(Editor && edit_prediction)", | |
| "bindings": { | |
| "alt-l": null | |
| } | |
| }, | |
| { | |
| "context": "(Editor && edit_prediction_conflict)", | |
| "bindings": { | |
| "alt-l": null | |
| } | |
| }, | |
| { | |
| "bindings": { | |
| "ctrl-alt-l": [ | |
| "workspace::MoveItemToPaneInDirection", | |
| { | |
| "direction": "right" | |
| } | |
| ], | |
| "ctrl-alt-h": [ | |
| "workspace::MoveItemToPaneInDirection", | |
| { | |
| "direction": "left" | |
| } | |
| ], | |
| "ctrl-alt-k": [ | |
| "workspace::MoveItemToPaneInDirection", | |
| { | |
| "direction": "up" | |
| } | |
| ], | |
| "ctrl-alt-j": [ | |
| "workspace::MoveItemToPaneInDirection", | |
| { | |
| "direction": "down" | |
| } | |
| ] | |
| } | |
| }, | |
| // { | |
| // "context": "((vim_mode == visual) && !menu)", | |
| // "bindings": { | |
| // "shift-k": ["workspace::SendKeystrokes", "[ e"] | |
| // } | |
| // }, | |
| { | |
| "context": "Terminal", | |
| "bindings": { | |
| "ctrl-w": "pane::CloseActiveItem" | |
| } | |
| }, | |
| { | |
| "context": "Workspace", | |
| "bindings": { | |
| "alt-shift-=": [ | |
| "workspace::IncreaseActiveDockSize", | |
| { | |
| "px": 30 | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "context": "Workspace", | |
| "bindings": { | |
| "alt-shift--": [ | |
| "workspace::DecreaseActiveDockSize", | |
| { | |
| "px": 30 | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "context": "(Editor && vim_mode != normal && !menu)", | |
| "bindings": { | |
| "ctrl-h": "buffer_search::DeployReplace" | |
| } | |
| }, | |
| { | |
| "context": "Editor && edit_prediction_conflict && showing_completions", | |
| "bindings": { | |
| "tab": "editor::AcceptEditPrediction" | |
| } | |
| }, | |
| { | |
| "context": "(Editor && edit_prediction_conflict)", | |
| "bindings": { | |
| "alt-tab": null | |
| } | |
| }, | |
| { | |
| "context": "(Editor && edit_prediction_conflict)", | |
| "bindings": { | |
| "tab": "editor::AcceptEditPrediction" | |
| } | |
| }, | |
| { | |
| "context": "(VimControl && !menu)", | |
| "bindings": { | |
| "right": null | |
| } | |
| }, | |
| { | |
| "context": "(VimControl && !menu)", | |
| "bindings": { | |
| "left": null | |
| } | |
| }, | |
| { | |
| "context": "(VimControl && !menu)", | |
| "bindings": { | |
| "up": null | |
| } | |
| }, | |
| { | |
| "context": "(VimControl && !menu)", | |
| "bindings": { | |
| "down": null | |
| } | |
| }, | |
| { | |
| "context": "Editor", | |
| "bindings": { | |
| "down": null | |
| } | |
| }, | |
| { | |
| "context": "vim_mode == insert", | |
| "bindings": { | |
| "alt-j": "editor::MoveDown" | |
| } | |
| }, | |
| { | |
| "context": "Editor", | |
| "bindings": { | |
| "left": null | |
| } | |
| }, | |
| { | |
| "context": "vim_mode == insert", | |
| "bindings": { | |
| "alt-h": "editor::MoveLeft" | |
| } | |
| }, | |
| { | |
| "context": "Editor", | |
| "bindings": { | |
| "right": null | |
| } | |
| }, | |
| { | |
| "context": "vim_mode == insert", | |
| "bindings": { | |
| "alt-l": "editor::MoveRight" | |
| } | |
| }, | |
| { | |
| "context": "Editor", | |
| "bindings": { | |
| "up": null | |
| } | |
| }, | |
| { | |
| "context": "vim_mode == insert", | |
| "bindings": { | |
| "alt-k": "editor::MoveUp" | |
| } | |
| }, | |
| { | |
| "context": "((VimControl && !menu) || (!Editor && !Terminal))", | |
| "bindings": { | |
| "tab": "vim::GoToTab" | |
| } | |
| }, | |
| { | |
| "context": "((VimControl && !menu) || (!Editor && !Terminal))", | |
| "bindings": { | |
| "shift-tab": "vim::GoToPreviousTab" | |
| } | |
| }, | |
| { | |
| "context": "(VimControl && !menu)", | |
| "bindings": { | |
| "ctrl-f": "vim::Search" | |
| } | |
| }, | |
| { | |
| "context": "vim_mode == visual || vim_mode == normal", | |
| "bindings": { | |
| "g c": "vim::ToggleComments" | |
| } | |
| }, | |
| { | |
| "context": "vim_mode == insert", | |
| "bindings": { | |
| "ctrl-u": "editor::UndoSelection" | |
| } | |
| }, | |
| { | |
| "context": "Picker > Editor", | |
| "bindings": { | |
| "ctrl-u": null | |
| } | |
| }, | |
| { | |
| "context": "Editor", | |
| "bindings": { | |
| "alt-shift-=": "editor::SelectLargerSyntaxNode" | |
| } | |
| }, | |
| { | |
| "context": "Editor", | |
| "bindings": { | |
| "alt-shift--": "editor::SelectSmallerSyntaxNode" | |
| } | |
| }, | |
| { | |
| "context": "Editor", | |
| "bindings": { | |
| "ctrl-alt-shift-=": "editor::SelectToNextSubwordEnd" | |
| } | |
| }, | |
| { | |
| "context": "Editor", | |
| "bindings": { | |
| "ctrl-alt-shift--": "editor::SelectToPreviousSubwordStart" | |
| } | |
| }, | |
| { | |
| "context": "(((Editor && vim_mode == visual) && !VimWaiting) && !VimObject)", | |
| "bindings": { | |
| "shift-j": "editor::MoveLineDown" | |
| } | |
| }, | |
| { | |
| "context": "Terminal", | |
| "bindings": { | |
| "ctrl-x": "terminal::Clear" | |
| } | |
| }, | |
| { | |
| "context": "Workspace || ProjectPanel", | |
| "bindings": { | |
| "ctrl-p": "file_finder::Toggle" | |
| } | |
| } | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment