cursorless-dev / cursorless

Don't let the cursor slow you down
https://www.cursorless.org/
MIT License
1.14k stars 79 forks source link

allow sorting one scope based on a second scope as the "key" #2146

Open timo opened 10 months ago

timo commented 10 months ago

image

image

this feature request is about being able to sort a set of targets using a second set of targets to decide the order

in other words, decouple what gets cut out and pasted in a sorted order from how the order should be decided

in the first example image above, just saying sort this would result in our family names being swapped around, while saying sort line this would sort by first name instead of last name

in the second example image above, sort this would change which item gets which rating, and sort line this would not sort by rating.

a possible command for this could be using this sort line, and by allowing a target in general for the first bit, things like using its name sort every func could be possible as well

pokey commented 10 months ago

by allowing a target in general for the first bit, things like using its name sort every func could be possible as well

We have no mechanism for this kind of thing, and no theoretical infrastructure for something like that. The only thing we have today would be a way to zip the key targets with the sortee targets a la "using this sort line". We could think through a way to make something like your its proposal work, but keep in mind we're increasingly of the belief that its was probably a mistake; people try to sprinkle it everywhere because it is such an ambiguous word

timo commented 6 months ago

it would be fine by me to have only "using this sort line" work