Skip to content

feat: add goto_first_selection, goto_last_selection #13615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Axlefublr
Copy link
Contributor

The usecase is to have made some selections, and then jumping to either the first or the last one, to then "remove all other selections" on. Very helpful for navigation!

@Axlefublr Axlefublr force-pushed the Axlefublr/goto_first_last_selection branch from 0281200 to 10dbdf7 Compare May 29, 2025 00:54
Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We aren't always rigorous/consistent about what verb we use for selection changes ("goto" vs. "move" for example) but here "goto" seems off to me since it's usually used for changing the selection range (and sometimes file), like goto_definition. I'm not sure what the right verb is for this though. "Rotate" also doesn't seem quite right but it would match rotate_selections_{forward,backward}. It's a bit wordier but how about set_{first,last}_primary_selection?

@the-mikedavis the-mikedavis added the A-command Area: Commands label May 29, 2025
@Axlefublr
Copy link
Contributor Author

hmmm yeah good catch. goto is off here
set_first_primary_selection incurs the natural question of "to what?", as if you're setting the primary selection to something. I think set_primary_selection_first would work a bit better
I'm on the side of rotate_selection_first, though. it's imperfect too, but I think if a user knows what rotate_selections_forward means (I didn't get it at all until I tried it), they should be able to guess what _first would mean.
I'll change to rotate_selection_… format, and hear back your thoughts; I'm not necessarily tied to this variant

@Axlefublr Axlefublr force-pushed the Axlefublr/goto_first_last_selection branch from 10dbdf7 to 80987b8 Compare May 30, 2025 03:18
@Axlefublr
Copy link
Contributor Author

as I touched upon, I don't quite like rotate_selections to begin with as a wording choice, but I think it's better for consistency now to stick to it, so that primary selection-changing actions are all together, and more discoverable to the user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-command Area: Commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants