Movement selection inconsistency? #6033
-
Hi Helix team. I'm getting used to Helix motions and selections. I was wondering if a particular behavior of a motion + selection is expected or should be fixed. I'll use some screenshots to explain it: Step 1: Initial position My question is if in the example above, the resulting selection should start from the beginning of the word "second", or if this is the expected behavior. I was reading the philosophy around Kakoune's editing model and they say that moving is selecting. Considering that, the backwards motion in step 2 of this example should be considered selection, and the forward motions after pressing Let me know your thought on this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This behavior is intended. Ranges in selections have a head and an achor and in select mode the anchor stays put while the head is moved. (The head is where the cursor is.) To select "second third fourth" in this case you would want to use Moving around doesn't necessarily always give you a larger selection. Near the end of that section in the Kakoune docs there is a note: "capital commands tend to expand the selection." (Where capital commands in Kakoune are generally the same as select-mode in Helix.) Motions might also be used to tune existing selections in select mode: you might use |
Beta Was this translation helpful? Give feedback.
This behavior is intended. Ranges in selections have a head and an achor and in select mode the anchor stays put while the head is moved. (The head is where the cursor is.)
To select "second third fourth" in this case you would want to use
flip_selections
(A-;
) after step 2 to swap the head and anchor.Moving around doesn't necessarily always give you a larger selection. Near the end of that section in the Kakoune docs there is a note: "capital commands tend to expand the selection." (Where capital commands in Kakoune are generally the same as select-mode in Helix.) Motions might also be used to tune existing selections in select mode: you might use
h
to shrink a forwards-facing selection…