I would like to add a shortcut to stage changes in all files "toggled" in the SCM pane of VS Code. The behavior should be the same as if I clicked on the plus icon of a particular file having multiple files toggled (see picture):
I have set the following keybinding so far:
{
"key": "cmd+enter",
"command": "git.stage",
"when": "listFocus && sideBarFocus && activeViewlet == 'workbench.view.scm'"
}
This does not work properly. It stages only a file that was in the last focused editor, ignoring the selection made in Changes.
Any ideas on how I could fix my 'when' to make it work?
Just for context, I would like to be able to stage a selected list of files in Change using only the keyboard.
Thanks!
I found a way of doing it only by using keyboard, but it require few more steps:
Shift + ctrl +g ,g
-> to focus on SCM windowThen holding
shift
select files with arrowsThen press
tab
, you should see highlight like below:Then you can move to
+
button with right arrow and pressenter
: