-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
Git: add default keybinding for Stage / Revert / Unstage selected lines #93564
Comments
@isidorn Some shortcut confilcts: |
@sportshead thanks for pointing out. Yeah we need to find some free keybindings. |
@isidorn I suppose we could overwrite |
@isidorn Following discussion at #93498, I would like to work on this issue, too. I also think that we should not override "Open Keyboard Shortcuts". While Ctrl/Cmd + K,Ctrl/Cmd + G is also free, but the 'G' key is close to the 'R' key, so it's easier to call the Revert command by mistake. |
Forgive my ignorance, but would it be possible to use something like ctrl + k ctrl + shift + s or ctrl + k alt + s? |
Actually |
git.stageSelectedRanges -> ctrl + k, ctrl + alt + s git.unstageSelectedRanges -> ctrl + k, ctrl + u git.revertSelectedRanges -> ctrl + k, ctrl + r Closes microsoft#93564
Great, thanks a lot. I have commented on the PR. |
@isidorn @joaomoreno However this command is not available on the version of VSCode I built from the source code, that's why I did not notice it at first. vscode/src/vs/workbench/browser/actions/helpActions.ts Lines 234 to 236 in 62c70b1
Also I don't understand why the GitHub CI threw an error. Should I worry about it? |
Please note that due to conflict with the uncomment line which @sportshead mentioned I had to change the unstange from |
Git extension needs to use the context
isInDiffEditor
and add keybindings only when that context is set.Ctrl/Cmd + K, Cltr/Cmd + S / R / U makes good sense for defaults.
fyi @joaomoreno @jvesouza
The text was updated successfully, but these errors were encountered: