Skip to content

Helix Select Mode#37748

Merged
kubkon merged 41 commits intozed-industries:mainfrom
romaninsh:helix-select2
Sep 12, 2025
Merged

Helix Select Mode#37748
kubkon merged 41 commits intozed-industries:mainfrom
romaninsh:helix-select2

Conversation

@romaninsh
Copy link
Contributor

@romaninsh romaninsh commented Sep 8, 2025

Please credit @eliaperantoni, for the original PR (#34136).
Merge after (#34060) to avoid conflicts.

Closes #33838
Closes #33906

Release Notes:

  • Helix will no longer sometimes fall out into "normal" mode, will remain in "helix normal" (example: vv)
  • Added dedicated "helix select" mode that can be targeted by keybindings

Known issues:

  • Helix motion, especially surround-add will not properly work in visual mode, as it won't call helix_move_cursor. It is possible however to respect self.mode in change_selection now.
  • Some operations, such as Ctrl+A (increment) or > (indent) will collapse selection also. I haven't found a way to avoid it.

fantacell and others added 30 commits July 8, 2025 15:13
- fix the operators' display in the status bar
- fill the subword object placeholder
- fix some spelling mistakes
- fix a bug where the first and last words in a buffer couldn't be selected
one object. This makes return types shorter and makes it easy to add an
extra helix object entirely. Also add logic for the sentence and
paragraph text objects. The way this is implemented would make it easy
to for example ignore brackets after a backslash.
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Sep 8, 2025
@romaninsh romaninsh marked this pull request as ready for review September 9, 2025 16:48
@romaninsh
Copy link
Contributor Author

@ConradIrwin ready for merge.

Copy link
Member

@kubkon kubkon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@kubkon kubkon merged commit cba9ff5 into zed-industries:main Sep 12, 2025
21 checks passed
kubkon pushed a commit that referenced this pull request Sep 14, 2025
Hotfixes issue I have introduced in #37748.

Without this, helix mode select not working at all in `main` branch.

Release Notes:

- N/A
@morlinbrot
Copy link

Added dedicated "helix select" mode that can be targeted by keybindings

At the risk of sounding ignorant, but: How can I target it? "m": "vim::HelixSelect" doesn't do the trick.

@romaninsh
Copy link
Contributor Author

@morlinbrot , wow good question.. I guess vim::ToggleVisual.

@romaninsh romaninsh deleted the helix-select2 branch September 19, 2025 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

5 participants