Hiya,
Is it possible for a bundle command to accept a single selection and return multiple selections (or just carets)?
Here’s an example (brackets indicate selection, | is a caret );
Stage 1:
state: …class="|dark-theme"…
action: select "dark-theme"
Stage 2:
state: …class="[dark-theme]"…
action: [Hypothetical caret split command]
Stage 3a:
state: …class="[dark]-[theme]"…
or
Stage 3b:
state: …class="|dark-|theme"…
Then I’d press command T to switch from "dark-theme" to "theme-dark".
Im not sure what the logic would be in the bundle, my use would be served by simply returning the caret at the beginning and end of my selection (then command + w to select the word).
I’m also curious how Filter Through Command’s behavior could be reproduced in a bundle command, where the commands results are distributed to each line.
Thanks everyone!
Graham P Heath
ps: I’ve got some serious love for multiple carets ♥️♥️♥️