Open alexherbo2 opened 3 years ago
It's a good idea, except I think 0 might be confusing since the whole selection technically already is what would be stored under register 0.
So it'd be even better to have a mechanism to select any selection of groups by index — or all. I would intuitively do that in a plugin/command, using the a-z primitive as documented above. :select-matching-groups [0 1 2…]<ret>
Another possibility would be to select all capture groups by default, and to select everything if there are none. Since capture group are rarely used, I think this won't affect interactive usage much, but it's still a breaking change. It does enable a seemingly-simple-but-difficult-to-do operation so it could be interesting.
It can be tedious to select more than one capture.
Example
With the following selection:
Executing
will result:
The current way to do is:
Example in
:edit-search
.@lenormf Do not tell me “Why not just
S:<ret>
?” please :grin: