如何使用键盘快捷键在VS Code中打开编辑器边栏的内联差异查看?

huangapple go评论68阅读模式
英文:

How can I open an editor gutter's inline diff peek view in VS Code with keyboard shortcut?

问题

在VS Code中,有关每行的git状态的信息显示在边栏中,如下所示:
如何使用键盘快捷键在VS Code中打开编辑器边栏的内联差异查看?

如果您点击边栏,这将展开一个菜单,显示本地的差异,如下所示:
如何使用键盘快捷键在VS Code中打开编辑器边栏的内联差异查看?

是否有办法在不点击它的情况下打开先前的菜单,而是在光标所在行使用键盘快捷键?

有快捷键可用于循环浏览不同的更改,但我想要的是能够在特定行上打开此菜单,而不是迫使我在文档中循环浏览,最终回到最初的位置。
我已在设置、在线文档和论坛中搜索,但没有找到答案。

英文:

In VS Code there's information in the gutter regarding the git status of each line, that looks like so:
如何使用键盘快捷键在VS Code中打开编辑器边栏的内联差异查看?
If you click in the gutter, this expands a menu that shows the diff locally, like so:
如何使用键盘快捷键在VS Code中打开编辑器边栏的内联差异查看?

Is there any way to open the previous menu without clicking on it, and instead using a keyboard shortcut in the line where the cursor is located?

There are shortcuts to cycle through the different changes, but I want something that would open up this menu on the specific line, not something that would force me to circle around the document to end up in the place I was originally.
I've searched in the settings, online documentation and forums and came out empty handed.

答案1

得分: 1

你可能想要检查/添加这些命令的快捷方式:

  • editor.action.dirtydiff.next - Alt+F3
  • editor.action.dirtydiff.previous - Shift+Alt+F3

这些是默认的按键绑定,但你可以进行修改。

英文:

You might want to check / add shortcuts for these commands:

editor.action.dirtydiff.next - Alt+F3
editor.action.dirtydiff.previous - Shift+Alt+F3

These are the default keybinds but you can modify.

huangapple
  • 本文由 发表于 2023年6月12日 06:40:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/76452789.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定