-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Re-order Helix keymaps and add alt-o/i/p/n #40527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-order Helix keymaps and add alt-o/i/p/n #40527
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @atahrijouti on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
You missed out on adding alt-n and alt-p, those two have now got corresponding zed actions: |
there you go |
Release Notes: - helix: Re-ordered `helix_normal || helix_select` keybindings to follow the same order as the keymap on the helix-editor [documentation](https://docs.helix-editor.com/keymap.html). - helix: Added `alt-o` & `alt-i` to Select larger and smaller syntax node respectively - helix: Added `alt-p` & `alt-n` to Select Next Syntax Node and Previous Syntax Node respectively --- The new main helix normal & select context looks like follows ```jsonc { "context": "(vim_mode == helix_normal || vim_mode == helix_select) && !menu", "bindings": { // Movement "h": "vim::WrappingLeft", "left": "vim::WrappingLeft", "l": "vim::WrappingRight", "right": "vim::WrappingRight", "t": ["vim::PushFindForward", { "before": true, "multiline": true }], "f": ["vim::PushFindForward", { "before": false, "multiline": true }], "shift-t": ["vim::PushFindBackward", { "after": true, "multiline": true }], "shift-f": ["vim::PushFindBackward", { "after": false, "multiline": true }], "alt-.": "vim::RepeatFind", // Changes "shift-r": "editor::Paste", "`": "vim::ConvertToLowerCase", "alt-`": "vim::ConvertToUpperCase", "insert": "vim::InsertBefore", "shift-u": "editor::Redo", "ctrl-r": "vim::Redo", "y": "vim::HelixYank", "p": "vim::HelixPaste", "shift-p": ["vim::HelixPaste", { "before": true }], ">": "vim::Indent", "<": "vim::Outdent", "=": "vim::AutoIndent", "d": "vim::HelixDelete", "c": "vim::HelixSubstitute", "alt-c": "vim::HelixSubstituteNoYank", // Selection manipulation "s": "vim::HelixSelectRegex", "alt-s": ["editor::SplitSelectionIntoLines", { "keep_selections": true }], ";": "vim::HelixCollapseSelection", "alt-;": "vim::OtherEnd", ",": "vim::HelixKeepNewestSelection", "shift-c": "vim::HelixDuplicateBelow", "alt-shift-c": "vim::HelixDuplicateAbove", "%": "editor::SelectAll", "x": "vim::HelixSelectLine", "shift-x": "editor::SelectLine", "ctrl-c": "editor::ToggleComments", "alt-o": "editor::SelectLargerSyntaxNode", "alt-i": "editor::SelectSmallerSyntaxNode", "alt-p": "editor::SelectPreviousSyntaxNode", "alt-n": "editor::SelectNextSyntaxNode", // Goto mode "g e": "vim::EndOfDocument", "g h": "vim::StartOfLine", "g l": "vim::EndOfLine", "g s": "vim::FirstNonWhitespace", // "g s" default behavior is "space s" "g t": "vim::WindowTop", "g c": "vim::WindowMiddle", "g b": "vim::WindowBottom", "g r": "editor::FindAllReferences", // zed specific "g n": "pane::ActivateNextItem", "shift-l": "pane::ActivateNextItem", "g p": "pane::ActivatePreviousItem", "shift-h": "pane::ActivatePreviousItem", "g .": "vim::HelixGotoLastModification", // go to last modification // Window mode "space w h": "workspace::ActivatePaneLeft", "space w l": "workspace::ActivatePaneRight", "space w k": "workspace::ActivatePaneUp", "space w j": "workspace::ActivatePaneDown", "space w q": "pane::CloseActiveItem", "space w s": "pane::SplitRight", "space w r": "pane::SplitRight", "space w v": "pane::SplitDown", "space w d": "pane::SplitDown", // Space mode "space f": "file_finder::Toggle", "space k": "editor::Hover", "space s": "outline::Toggle", "space shift-s": "project_symbols::Toggle", "space d": "editor::GoToDiagnostic", "space r": "editor::Rename", "space a": "editor::ToggleCodeActions", "space h": "editor::SelectAllMatches", "space c": "editor::ToggleComments", "space p": "editor::Paste", "space y": "editor::Copy", // Other ":": "command_palette::Toggle", "m": "vim::PushHelixMatch", "]": ["vim::PushHelixNext", { "around": true }], "[": ["vim::PushHelixPrevious", { "around": true }], "g q": "vim::PushRewrap", "g w": "vim::PushRewrap", // "tab": "pane::ActivateNextItem", // "shift-tab": "pane::ActivatePrevItem", } } ```
Release Notes:
helix_normal || helix_selectkeybindings to follow the same order as the keymap on the helix-editor documentation.alt-o&alt-ito Select larger and smaller syntax node respectivelyalt-p&alt-nto Select Next Syntax Node and Previous Syntax Node respectivelyThe new main helix normal & select context looks like follows
{ "context": "(vim_mode == helix_normal || vim_mode == helix_select) && !menu", "bindings": { // Movement "h": "vim::WrappingLeft", "left": "vim::WrappingLeft", "l": "vim::WrappingRight", "right": "vim::WrappingRight", "t": ["vim::PushFindForward", { "before": true, "multiline": true }], "f": ["vim::PushFindForward", { "before": false, "multiline": true }], "shift-t": ["vim::PushFindBackward", { "after": true, "multiline": true }], "shift-f": ["vim::PushFindBackward", { "after": false, "multiline": true }], "alt-.": "vim::RepeatFind", // Changes "shift-r": "editor::Paste", "`": "vim::ConvertToLowerCase", "alt-`": "vim::ConvertToUpperCase", "insert": "vim::InsertBefore", "shift-u": "editor::Redo", "ctrl-r": "vim::Redo", "y": "vim::HelixYank", "p": "vim::HelixPaste", "shift-p": ["vim::HelixPaste", { "before": true }], ">": "vim::Indent", "<": "vim::Outdent", "=": "vim::AutoIndent", "d": "vim::HelixDelete", "c": "vim::HelixSubstitute", "alt-c": "vim::HelixSubstituteNoYank", // Selection manipulation "s": "vim::HelixSelectRegex", "alt-s": ["editor::SplitSelectionIntoLines", { "keep_selections": true }], ";": "vim::HelixCollapseSelection", "alt-;": "vim::OtherEnd", ",": "vim::HelixKeepNewestSelection", "shift-c": "vim::HelixDuplicateBelow", "alt-shift-c": "vim::HelixDuplicateAbove", "%": "editor::SelectAll", "x": "vim::HelixSelectLine", "shift-x": "editor::SelectLine", "ctrl-c": "editor::ToggleComments", "alt-o": "editor::SelectLargerSyntaxNode", "alt-i": "editor::SelectSmallerSyntaxNode", "alt-p": "editor::SelectPreviousSyntaxNode", "alt-n": "editor::SelectNextSyntaxNode", // Goto mode "g e": "vim::EndOfDocument", "g h": "vim::StartOfLine", "g l": "vim::EndOfLine", "g s": "vim::FirstNonWhitespace", // "g s" default behavior is "space s" "g t": "vim::WindowTop", "g c": "vim::WindowMiddle", "g b": "vim::WindowBottom", "g r": "editor::FindAllReferences", // zed specific "g n": "pane::ActivateNextItem", "shift-l": "pane::ActivateNextItem", "g p": "pane::ActivatePreviousItem", "shift-h": "pane::ActivatePreviousItem", "g .": "vim::HelixGotoLastModification", // go to last modification // Window mode "space w h": "workspace::ActivatePaneLeft", "space w l": "workspace::ActivatePaneRight", "space w k": "workspace::ActivatePaneUp", "space w j": "workspace::ActivatePaneDown", "space w q": "pane::CloseActiveItem", "space w s": "pane::SplitRight", "space w r": "pane::SplitRight", "space w v": "pane::SplitDown", "space w d": "pane::SplitDown", // Space mode "space f": "file_finder::Toggle", "space k": "editor::Hover", "space s": "outline::Toggle", "space shift-s": "project_symbols::Toggle", "space d": "editor::GoToDiagnostic", "space r": "editor::Rename", "space a": "editor::ToggleCodeActions", "space h": "editor::SelectAllMatches", "space c": "editor::ToggleComments", "space p": "editor::Paste", "space y": "editor::Copy", // Other ":": "command_palette::Toggle", "m": "vim::PushHelixMatch", "]": ["vim::PushHelixNext", { "around": true }], "[": ["vim::PushHelixPrevious", { "around": true }], "g q": "vim::PushRewrap", "g w": "vim::PushRewrap", // "tab": "pane::ActivateNextItem", // "shift-tab": "pane::ActivatePrevItem", } }