Skip to content
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

Proposal: Collapses the complete selection into a single point #461

Closed

Conversation

luctius
Copy link
Contributor

@luctius luctius commented Jul 17, 2021

To me it is unintuitive that the collapse selection ';', shrinks all selections into a single point, but keeps the multiple selections. Therefore this proposal.

I understand that both might be desirable though and am willing to make this a separate command if so desired.

@archseer
Copy link
Member

Yeah so it's two commands: ; collapses the cursors and space+space retains only the primary selection. That second one is a bit hard to discover, it's space in kakoune but we had to move it to fit the space mode. An idea is to maybe add this behavior to Esc in normal mode.

The combined function could be mapped somewhere, alt-; is already taken so maybe space+;? Would be the equivalent of <space><space>;.

@pickfire
Copy link
Contributor

pickfire commented Jul 17, 2021

An idea is to maybe add this behavior to Esc in normal mode.

I was thinking about the same thing but not sure if that's possible.

I do think that we should keep them separate since both is different things, sometimes I use one, sometimes the other one, sometimes both.

@Cons-Cat
Copy link
Contributor

Cons-Cat commented Jul 17, 2021

Would it be reasonable for ; to collapse all selections as it does now / in Kakoune, and if all current selections are 1-width cursors then tapping it just removes all secondary cursors? So double tapping ; would always bring you into the "default" position of having a single 1-width cursor.

@luctius
Copy link
Contributor Author

luctius commented Jul 17, 2021

Yeah so it's two commands: ; collapses the cursors and space+space retains only the primary selection. That second one is a bit hard to discover, it's space in kakoune but we had to move it to fit the space mode. An idea is to maybe add this behavior to Esc in normal mode.

The combined function could be mapped somewhere, alt-; is already taken so maybe space+;? Would be the equivalent of <space><space>;.

Right, I figured there almost must have been, but I didn't find it after a quick search.

Would it be reasonable for ; to collapse all selections as it does now / in Kakoune, and if all current selections are 1-width cursors then tapping it just removes all secondary cursors? So double tapping ; would always bring you into the "default" position of having a single 1-width cursor.

I really like this suggestion. I will at-least make the chance, and we'll see where that goes.

Mode 1: Shrink all ranges to 1 range.
Mode 2: Collapse whole selection to 1 point.

Mode 2 is only activated when all ranges in the selection are at 1 range.
@archseer
Copy link
Member

archseer commented Nov 9, 2021

We ended up remapping space space to ,. There was some concerns regarding merging the two keys so we're keeping them separate for now.

@archseer archseer closed this Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants