-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Helix mode search and selection improvements #41583
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
Merged
Merged
Conversation
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
10bd5fb to
c775178
Compare
SwitchToHelixNormalMode
tomatitito
pushed a commit
to tomatitito/zed
that referenced
this pull request
Nov 7, 2025
Closes zed-industries#41125 Release Notes: - Fixed `SwitchToHelixNormalMode` to keep selection - Added default keybinds for `SwitchToHelixNormalMode` when in Helix mode
dinocosta
added a commit
to shaik-zeeshan/zed
that referenced
this pull request
Nov 17, 2025
Revert the original changes done to fix the issue with `g d` in vim mode updating the mode to Visual. After looking into this it appears this was accidentally changed in zed-industries#41583 with the removal of the `collapse_matches` field from the `Editor`, which would be provided to the `range_for_match` method and, in the case where vim mode was enabled, it was `true`, avoiding the change to visual mode when jumping to definition. This commit updates the `Editor.navigate_to_hover_links` method in order to check if vim mode is enabled, in which case it now collapses the range, otherwise it won't, returning to the previous behavior.
ConradIrwin
added a commit
that referenced
this pull request
Nov 17, 2025
This reverts commit eab06eb.
ConradIrwin
added a commit
that referenced
this pull request
Nov 17, 2025
Closes #ISSUE Release Notes: - Fixes vim "go to definition" making a selection
github-actions bot
pushed a commit
that referenced
this pull request
Nov 17, 2025
Closes #ISSUE Release Notes: - Fixes vim "go to definition" making a selection
github-actions bot
pushed a commit
that referenced
this pull request
Nov 17, 2025
Closes #ISSUE Release Notes: - Fixes vim "go to definition" making a selection
HactarCE
added a commit
that referenced
this pull request
Nov 19, 2025
mikayla-maki
pushed a commit
that referenced
this pull request
Nov 20, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Closes #41125
Closes #41164
This PR removes the out-of-band tracking of whether selection ranges should be compacted to the start of the range. That's useful for things like
SelectNextMatchin vim, but it turns out not to be as universal when using vim mode as the original authors had thought, so we'd have to do silly hacks like turning that setting on and off between certain motions to get the correct behavior both for vim and helix modes.Now you have to explicitly pass a
collapseflag into the helpers having to do with buffer search selection matching, and we've migrated the relevant APIs to use that.We also discovered a false positive in the helix tests around
sused without a selection. In helix this doesn't do anything, but because of the semantics of our "search selected lines" flag, in zed it simply acts like/. We've disabled this test for now because the more faithful behavior doesn't seem necessarily more useful.Release Notes:
SwitchToHelixNormalModeto keep selection when hitting escape from select mode, and bound it toescapein helix select mode by default.vim::MoveToNextMatchandsearch::SelectNextMatch(as well as theirpreviouscounterparts) when using helix mode. When enabled, the latter now creates multiple selections using multicursor, unlike in vim where it simply deselects the current match and selects the next one.