You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Helix have a dedicated (minor) mode for extending the selection(s), the selection mode, which turns regular movements and gotos to not only reposition the cursor, but also extend the selection to this new position.
However, jumping is currently not covered as valid repositioning for extending the selection which I think would be useful to have. (As long as the jump is buffer local, i.e. does not jump to a different buffer.)
In order to work effectively with the selection, having more options on how to manage it would be preferable.
I first started to look into this when I couldn't use v/ in order to extend my selection, as that is used to add search hits to the selection (with another cursor) rather than extending the current selection.
To solve this, I tried c-s to save my current position to the jumplist. Then after searching, vc-o to enter selection mode and jumping out to my saved position in the jumplist. Alas, jumps don't extend the selection. (yet?)
This is my primary motivating use case, but I'm sure there a numerous other ways to jump, that could also benefit from being used to extend the selection rather than only moving the cursor. (but only when performed in the selection mode.)
N.b. vgw?? (where ?? is a two-letter label presented in-buffer after hitting gw) allows you to go to any labeled point on the current page, which is easily overlooked and quite powerful, but is limited to what is currently in view.
The text was updated successfully, but these errors were encountered:
This #165 (comment) highlights the design intent with the selection mode pretty well.
Given the above, I actually find it inconsistent that w, e, and b (and their upper case counterparts) extends the selection in normal mode and not just repositions the cursor.
EDIT: Actually no, I was wrong here. The movements selects the "unit of movement". It doesn't extend the selection, as when you move on to the next word, the previous word is no longer selected. This is consistent with hjkl movement as well, as you always have a selection of 1 moving around.
This is the use-case for marks #703, closing in favor of that. With marks you can save a selection to a register and then join it to your current selection.
Helix have a dedicated (minor) mode for extending the selection(s), the
selection
mode, which turns regular movements and gotos to not only reposition the cursor, but also extend the selection to this new position.However, jumping is currently not covered as valid repositioning for extending the selection which I think would be useful to have. (As long as the jump is buffer local, i.e. does not jump to a different buffer.)
In order to work effectively with the selection, having more options on how to manage it would be preferable.
I first started to look into this when I couldn't use
v/
in order to extend my selection, as that is used to add search hits to the selection (with another cursor) rather than extending the current selection.To solve this, I tried
c-s
to save my current position to the jumplist. Then after searching,vc-o
to enter selection mode and jumping out to my saved position in the jumplist. Alas, jumps don't extend the selection. (yet?)This is my primary motivating use case, but I'm sure there a numerous other ways to jump, that could also benefit from being used to extend the selection rather than only moving the cursor. (but only when performed in the
selection
mode.)N.b.
vgw??
(where??
is a two-letter label presented in-buffer after hittinggw
) allows you to go to any labeled point on the current page, which is easily overlooked and quite powerful, but is limited to what is currently in view.The text was updated successfully, but these errors were encountered: