Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vscode jump to git/source control shortcut/command for current file

Just wondering if anyone knows if there is a shortcut or command in vscode that will jump the current file to the source control tab?

I know that if you're in source control, cmd + ; will jump you to the file alone, but if you want to get back to the source control view, is there a reverse command?

Thanks!

like image 810
tnrich Avatar asked Aug 21 '18 21:08

tnrich


1 Answers

You can add a keyboard shortcut to jump to git changes view like so:

{
  "key": "shift+cmd+;",
  "command": "git.openChange"
},
{
  "key": "cmd+;",
  "command": "git.openFile"
}

then you can use cmd+; from within a file to jump to its git changes and shift+cmd+; to jump back.

like image 78
tgreen Avatar answered Oct 19 '22 20:10

tgreen