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

Exit select after rotate selections #3932

Closed
wants to merge 1 commit into from

Conversation

pickfire
Copy link
Contributor

After rotating selections users is probably done with the rotation they want, so it would be better to exit select mode rather than they have to press v again.

After rotating selections users is probably done with the rotation they
want, so it would be better to exit select mode rather than they have to
press v again.
Copy link
Contributor

@gavincrawford gavincrawford left a comment

Choose a reason for hiding this comment

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

Code LGTM, but could you clarify a little further on why exactly this makes the editor more fluent for the user?

@kirawi kirawi added A-helix-term Area: Helix term improvements S-waiting-on-review Status: Awaiting review from a maintainer. labels Sep 22, 2022
@pickfire
Copy link
Contributor Author

After I rotate the contents, then I moved the cursor and I realized I am still in extend mode, and have to quit it, I expected that after modification extend mode should be reverted back to insert mode.

@kirawi kirawi added the R-breaking-change This PR is a breaking change for some behavior label Sep 23, 2022
Copy link
Member

@dead10ck dead10ck left a comment

Choose a reason for hiding this comment

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

Am I understanding correctly that this would leave all the selections, but just go back to normal mode? So if the user wants to rotate multiple times, this does not interfere with that?

If so, looks good to me.

@pickfire
Copy link
Contributor Author

Yes, it does not touch selections, it only change back to normal mode, I believe it's unlikely user want to rotate and extend again then rotate and then extend, that would be rare I guess.

Copy link
Contributor

@gavincrawford gavincrawford left a comment

Choose a reason for hiding this comment

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

LGTM

@gavincrawford
Copy link
Contributor

Thanks for clarifying! :-)

@the-mikedavis
Copy link
Member

I'm split on this - I think this change makes sense but overall I'm not sure any command should automatically exit select mode. It would be simpler (easier to learn / memorize) if you could only ever use escape to exit select mode. If there are many commands that automatically exit select mode, it might become really nuanced or unpredictable.

@gavincrawford
Copy link
Contributor

I'm split on this - I think this change makes sense but overall I'm not sure any command should automatically exit select mode. It would be simpler (easier to learn / memorize) if you could only ever use escape to exit select mode. If there are many commands that automatically exit select mode, it might become really nuanced or unpredictable.

I see what you mean. It is inconsistent, but it may be slightly more fluent.
Is it more important to keep consistency than to make this change?

@dead10ck
Copy link
Member

Consistency is a strong explicit goal, but I don't think it should necessarily come at the detriment of more practical usability. For example, I think it's safe to assume most people would prefer the delete command to exit select mode.

@archseer
Copy link
Member

Yeah deletes and changes exit select mode because they do an action. For me it makes sense to stay in extend mode since I might be extending a selection, then cycling somewhere further in the file and continuing to extend.

@pickfire
Copy link
Contributor Author

pickfire commented Sep 26, 2022

Yeah deletes and changes exit select mode because they do an action. For me it makes sense to stay in extend mode since I might be extending a selection, then cycling somewhere further in the file and continuing to extend.

Yes, it is more consistent, but I see that as a rare case, cycling the selection is already "changing" the text to a certain extent, so it may or may not be consistent depending on whether you view cycling the selection is a change operation.

In terms of practicality, extending after rotating have less practical use compared to moving the cursors after selection, at least so far I never had that use case.

Extending after rotating I mean like changing aaaaa bbbbb ccccc ddddd eeeee to abcde bcdea cdeab deabc eabcd or something similar, I see no point doing that or something similar during coding except when doing code golf, yes keeping the extend mode in this case makes it much easier.

On the other hand, rotating multiple variables and then move the cursor to do something else, I always have to rotate and then based on those multiple cursors switch somewhere else.

@pascalkuthe
Copy link
Member

clsoing this PR as stale. I also think we likely won't be going forward with this one. Thank you for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements R-breaking-change This PR is a breaking change for some behavior S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants