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

fix: change default keybinding of cursorColumnSelectUp to ctrl+shift+… #41471

Merged
merged 2 commits into from Mar 26, 2018

Conversation

Projects
None yet
3 participants
@mikaoelitiana
Copy link
Contributor

mikaoelitiana commented Jan 11, 2018

…up on Windows

fixes #36819

@alexandrudima alexandrudima added this to the March 2018 milestone Mar 26, 2018

@alexandrudima alexandrudima merged commit a6ef8ca into Microsoft:master Mar 26, 2018

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
license/cla All CLA requirements met.
@alexandrudima

This comment has been minimized.

Copy link
Member

alexandrudima commented Mar 26, 2018

I actually ended up reverting this commit.

I cannot accept it because the column selection keybindings work together:

{ "key": "ctrl+shift+alt+down",   "command": "cursorColumnSelectDown",
                                     "when": "textInputFocus" },
{ "key": "ctrl+shift+alt+left",   "command": "cursorColumnSelectLeft",
                                     "when": "textInputFocus" },
{ "key": "ctrl+shift+alt+pagedown", "command": "cursorColumnSelectPageDown",
                                     "when": "textInputFocus" },
{ "key": "ctrl+shift+alt+pageup", "command": "cursorColumnSelectPageUp",
                                     "when": "textInputFocus" },
{ "key": "ctrl+shift+alt+right",  "command": "cursorColumnSelectRight",
                                     "when": "textInputFocus" },
{ "key": "ctrl+shift+alt+up",     "command": "cursorColumnSelectUp",
                                     "when": "textInputFocus" },

Changing just two of them only creates confusion. And we cannot change all of them because ctrl+shift+left and ctrl+shift+right are used for word selection.

@jhasse

This comment has been minimized.

Copy link
Contributor

jhasse commented Mar 26, 2018

What's the difference between cursorColumnSelectLeft and a simple Shift+Left?

@alexandrudima

This comment has been minimized.

Copy link
Member

alexandrudima commented Mar 26, 2018

The latter wraps (goes up) at line starts.

@jhasse

This comment has been minimized.

Copy link
Contributor

jhasse commented Mar 26, 2018

Ah I see, quite a minor detail IMHO. Also it doesn't seem to work with multiple cursors for me or is this a bug? If not, I don't see the use-case for the command at all.

I'm using cursorColumnSelectUp/Down to quickly get multiple cursors in a straight line. As I can't even use cursorColumnSelectLeft after that in a meaningful way and they do different things (adding a new cusor vs. expanding the selection), I don't see how they are related (beside the name).

Also note that cursorColumnSelectLeft/Right doesn't have any keybindings assigned by default on Linux and no one seems to mind (no issue about it).

@alexandrudima

This comment has been minimized.

Copy link
Member

alexandrudima commented Mar 26, 2018

@jhasse I am referring to Windows. On Windows, we bind the following:

{ "key": "ctrl+shift+alt+down",     "command": "cursorColumnSelectDown" },
{ "key": "ctrl+shift+alt+left",     "command": "cursorColumnSelectLeft" },
{ "key": "ctrl+shift+alt+pagedown", "command": "cursorColumnSelectPageDown" },
{ "key": "ctrl+shift+alt+pageup",   "command": "cursorColumnSelectPageUp" },
{ "key": "ctrl+shift+alt+right",    "command": "cursorColumnSelectRight" },
{ "key": "ctrl+shift+alt+up",       "command": "cursorColumnSelectUp" },

They are special commands that implement a special kind of selection which some other editors call box selection. They store hidden state (e.g. the right variant can go beyond the max column on a line). Rebinding two of the commands makes no sense, as they are useful together.

If all you are doing is adding cursors in a straight line, then, feel free to use ctrl+alt+up and ctrl+alt+down which do that. These commands (column selection) are different, and the differences are indeed subtle, but important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment