vim: Fix g i and g a in Helix mode to match Helix semantics#57621
Merged
Conversation
In Helix mode, `g i` and `g a` currently leak through from the catch-all
`VimControl && !menu` section:
- `g i` fires `vim::InsertAtPrevious` (Vim's "go to last insert"),
but Helix's `goto_implementation` expects an LSP jump.
- `g a` fires `editor::SelectAllMatches`, but Helix's
`goto_last_accessed_file` expects to jump to the alternate buffer.
This adds explicit overrides in the shared
`(vim_mode == helix_normal || vim_mode == helix_select)` section so
both keys behave per Helix's documented goto-mode bindings:
https://docs.helix-editor.com/keymap.html
Refs zed-industries#4642
|
We require contributors to sign our Contributor License Agreement, and we don't have @crazydude123 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'. |
Author
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @crazydude123 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'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
Author
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
TomPlanche
pushed a commit
to TomPlanche/zed
that referenced
this pull request
Jun 2, 2026
…industries#57621) In Helix mode, `g i` and `g a` currently leak through from the catch-all `VimControl && !menu` section: - `g i` fires `vim::InsertAtPrevious` (Vim's "go to last insert"), but Helix's `goto_implementation` expects an LSP jump to the implementation site. - `g a` fires `editor::SelectAllMatches`, but Helix's `goto_last_accessed_file` expects to jump to the alternate buffer. This adds explicit overrides in the shared `(vim_mode == helix_normal || vim_mode == helix_select)` section so both keys behave per Helix's documented goto-mode bindings: https://docs.helix-editor.com/keymap.html ### Before | Key | Helix expects (`goto_*`) | Zed actual (leaked from Vim) | | --- | --- | --- | | `g i` | `goto_implementation` (LSP) | `vim::InsertAtPrevious` | | `g a` | `goto_last_accessed_file` | `editor::SelectAllMatches` | ### After | Key | Action | | --- | --- | | `g i` | `editor::GoToImplementation` | | `g a` | `pane::AlternateFile` | Refs zed-industries#4642 Bounty: https://app.opire.dev/issues/01J6HJZCK02FVD4XG900FY36EE ### Release Notes: - vim: Fixed `g i` and `g a` in Helix mode to invoke `goto_implementation` and `goto_last_accessed_file` instead of leaking Vim-mode bindings. --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This was referenced Jun 3, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In Helix mode,
g iandg acurrently leak through from the catch-allVimControl && !menusection:g ifiresvim::InsertAtPrevious(Vim's "go to last insert"), but Helix'sgoto_implementationexpects an LSP jump to the implementation site.g afireseditor::SelectAllMatches, but Helix'sgoto_last_accessed_fileexpects to jump to the alternate buffer.This adds explicit overrides in the shared
(vim_mode == helix_normal || vim_mode == helix_select)section so both keys behave per Helix's documented goto-mode bindings: https://docs.helix-editor.com/keymap.htmlBefore
goto_*)g igoto_implementation(LSP)vim::InsertAtPreviousg agoto_last_accessed_fileeditor::SelectAllMatchesAfter
g ieditor::GoToImplementationg apane::AlternateFileRefs #4642
Bounty: https://app.opire.dev/issues/01J6HJZCK02FVD4XG900FY36EE
Release Notes:
g iandg ain Helix mode to invokegoto_implementationandgoto_last_accessed_fileinstead of leaking Vim-mode bindings.