有人知道在Visual Studio Code中切换编辑器和集成终端的快捷键(Mac和Linux)吗?


当前回答

我的1.56 VS Code的工作原理是:

Ctrl + ~     to focus on terminal window from editor
Ctrl + 9     to focus back on editor from terminal

其他回答

100%工作设置…

[
    { "key": "alt+right", "command": "workbench.action.terminal.focus"},
    { "key": "alt+left", "command": "workbench.action.focusActiveEditorGroup", "when": "terminalFocus"}   
]

从编辑器切换到 终端。workbench.action.focusActiveEditorGroup:切换 从终端到编辑器。

Control + '~'将用于在两者之间切换。' "就在标签按钮的上方。 这个快捷方式只能在mac中使用。

有点晚了,但我在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"
}

我想要单独的键来打开/关闭终端和在窗口之间来回切换焦点。

根据VS Code键盘快捷键文档页,切换集成终端的默认键绑定是“Ctrl+ '”。如果你不喜欢这个快捷方式,你可以在你的键绑定文件中添加类似的东西来改变它:

{ "key": "ctrl+l", "command": "workbench.action.terminal.toggleTerminal" }

似乎没有一个默认的键绑定来简单地聚焦底部面板。所以,如果你不想切换底部面板,你需要在你的keybindings文件中添加类似以下内容:

{ "key": "ctrl+t", "command": "workbench.action.focusPanel" }

嘿,我的工作步骤是:

CTRL + shift+ p,寻找首选项:键盘快捷键

或者你可以使用CTRL k + CTRL s直接打开它

在搜索框中寻找终端:焦点终端,我为自己设置了alt + T alt + T,但你可以选择你想要的组合 在搜索框中搜索“视图:焦点活动编辑器组”,为自己设置alt + E alt + E,但同样你可以选择你想要的组合

就是这样,我希望这对你有所帮助