<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Hiya,</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Is it possible for a bundle command to accept a single selection and return multiple selections (or just carets)? </div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="color: rgb(0, 0, 0); margin: 0px;"><span style="font-family: Helvetica, Arial; font-size: 13px;">Here’s an example (brackets indicate selection, </span><font face="Courier">|</font> is a caret );</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Stage 1:</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><span class="Apple-tab-span" style="white-space:pre"> </span>state: …class="<span style="font-family: Courier;">|</span>dark-theme"…</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><span class="Apple-tab-span" style="white-space:pre"> </span>action: select "dark-theme"</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Stage 2:</div><div id="bloop_customfont" style="font-size: 13px; color: rgb(0, 0, 0); margin: 0px;"><span style="font-family: Helvetica, Arial;"><span class="Apple-tab-span" style="white-space:pre"> </span>state: …class="[dark</span>-theme]"…</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><span class="Apple-tab-span" style="white-space: pre;"> </span>action: [Hypothetical caret split command]<span class="Apple-tab-span" style="white-space:pre"> </span></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-size: 13px; color: rgb(0, 0, 0); margin: 0px;"><div id="bloop_customfont" style="font-family: Helvetica, Arial; margin: 0px;">Stage 3a:</div><div id="bloop_customfont" style="margin: 0px;"><span style="font-family: Helvetica, Arial;"><span class="Apple-tab-span" style="white-space:pre"> </span>state: …class="[dark]-</span>[theme]"…</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;"> or</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;"><div id="bloop_customfont" style="margin: 0px;">Stage 3b:</div><div id="bloop_customfont" style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;"> </span>state: …class="<span style="font-family: Courier;">|</span>dark-<span style="font-family: Courier;">|</span>theme"…</div></div><div style="font-family: Helvetica, Arial;"><br></div></div><div>Then I’d press command T to switch from "dark-theme" to "theme-dark".</div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>Thanks everyone!</div><br><div class="bloop_sign" id="bloop_sign_1430340963531710976"><div style="font-family:helvetica,arial;font-size:13px">Graham P Heath<br><br></div><div style="font-family:helvetica,arial;font-size:13px"><br></div><div style="font-family:helvetica,arial;font-size:13px">ps: <span style="font-family: Helvetica, Arial;">I’ve got some serious love for multiple carets </span><span style="font-family: Helvetica, Arial;">♥️</span><span style="font-family: Helvetica, Arial;">♥️</span><span style="font-family: Helvetica, Arial;">♥️</span></div></div></body></html>