简体   繁体   English

vscode跳转到当前文件的git /源控制快捷方式/命令

[英]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? 只是想知道是否有人知道vscode中是否有快捷方式或命令将当前文件跳转到源控制选项卡?

I know that if you're in source control, cmd + ; 我知道如果你在源代码管理中, 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! 谢谢!

You can add a keyboard shortcut to jump to git changes view like so: 您可以添加键盘快捷键以跳转到git更改视图,如下所示:

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

then you can use cmd+; 然后你可以使用cmd+; from within a file to jump to its git changes and shift+cmd+; 从文件中跳转到它的git变化并shift+cmd+; to jump back. 跳回去。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM