Add default keybindings for stage/revert/unstage selected ranges#93706
Add default keybindings for stage/revert/unstage selected ranges#93706isidorn merged 2 commits intomicrosoft:masterfrom
Conversation
git.stageSelectedRanges -> ctrl + k, ctrl + alt + s git.unstageSelectedRanges -> ctrl + k, ctrl + u git.revertSelectedRanges -> ctrl + k, ctrl + r Closes microsoft#93564
| "category": "Git" | ||
| } | ||
| ], | ||
| "keybindings": [ |
There was a problem hiding this comment.
Please also add mac keybindings to use cmd instead of ctrl.
Example how markdown does it
|
@ChrisPapp Thanks for creating a PR for this. I have left a comment in the code which you should tackle for now. |
|
@isidorn Please take over this. |
|
@ChrisPapp assigning this to April, which means we will merge it starting of next week. Can you please tackle my comment until then? Thanks |
Use command key instead of ctrl on Mac
|
@isidorn |
|
That conflict is fine. All keybindins are taken in vscode you have to have some conflicts. Thanks for adding keybinding for mac, I will checkout the PR next week. |
| { | ||
| "command": "git.revertSelectedRanges", | ||
| "key": "ctrl+k ctrl+r", | ||
| "mac": "cmd+k cmd+r", |
There was a problem hiding this comment.
| "mac": "cmd+k cmd+r", | |
| "mac": "cmd+k cmd+alt+r", |
macOS VS Code has CmdK CmdR as a builtin keyboard shortcut that opens this link: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf
I don't know about Linux and windows, but best not to conflict.
There was a problem hiding this comment.
Perhaps if we do use alt, probably best to change revert for more uniformity?
|
Good job with this PR, let's go with these keybdingins and we'll see if we should change them due to conflicts. |
This PR fixes #93564
Created default keybindings for the following commands
Git: Stage Selected Ranges -> ctrl + k, ctrl + alt + s
Git: Unstage Selected Ranges -> ctrl + k, ctrl + u
Git: Revert Selected Ranges -> ctrl + k, ctrl + r
Note:
ctrl + k, ctrl + u is also used by "Remove Line Comment". "Unstage Selected Ranges" now overrides it, however similar functionality can be achieved by using "Toggle Line Comment" (ctrl + /)