有人知道在Visual Studio Code中在编辑器和集成终端之间切换焦点的键盘快捷键(Mac和Linux)吗?
发布于 2017-03-25 13:10:11
虽然VS Code有很多模式切换和导航快捷键,但没有一个专门用于“从编辑器移动到终端,然后再移动回来”。但是,您可以通过重载key和使用when clause来组合这两个步骤。
从编辑器中打开keybindings.json : CMD-SHIFT-P ->首选项:打开键盘快捷键文件并添加以下条目:
// Toggle between terminal and editor focus
{ "key": "ctrl+`", "command": "workbench.action.terminal.focus"},
{ "key": "ctrl+`", "command": "workbench.action.focusActiveEditorGroup", "when": "terminalFocus"}使用这些快捷键,我将使用相同的按键在编辑器和集成终端之间进行聚焦。
发布于 2017-09-13 02:41:27
开始玩这个游戏有点晚,但我在keybindings.json中将我的配置如下
{
"key": "ctrl+`",
"command": "workbench.action.terminal.focus",
"when": "editorTextFocus"
},
{
"key": "ctrl+`",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
},
{
"key": "alt+`",
"command": "workbench.action.terminal.toggleTerminal"
}我想要单独的键来打开/关闭终端,并在窗口之间来回切换焦点。
发布于 2017-03-15 06:03:28
根据VS代码键盘快捷键documentation页面,切换集成终端的缺省键绑定为"Ctrl+`“。如果你不喜欢这个快捷键,你可以在你的快捷键文件中修改它,方法是添加类似如下的内容:
{ "key": "ctrl+l", "command": "workbench.action.terminal.toggleTerminal" }似乎没有默认的键绑定来简单地将焦点放在底部面板上。因此,如果您不想切换底部面板,则需要向keybindings文件添加类似以下内容的内容:
{ "key": "ctrl+t", "command": "workbench.action.focusPanel" }https://stackoverflow.com/questions/42796887
复制相似问题