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


当前回答

Ctrl + J作品;但也显示/隐藏控制台。

cmd+J表示mac

其他回答

CTRL + -也可以,这意味着回到以前的光标位置

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

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

实际上,在VS Code 1.48.1中,有一个toggleTerminal命令;我不知道以前的版本中是否有;)您可以在键绑定中使用它。json文件。

这在Windows上适用,在Linux上也适用。

{
    "key": "ctrl+alt+right",
    "command": "workbench.action.terminal.toggleTerminal",
    "when": "editorTextFocus || terminalFocus"
}

根据键盘布局的不同(QWERTY/QWERTZ/AZERTA等)

要找到你的快捷键,按Ctrl+Shift+P,然后转到首选项:键盘快捷键。

从那里搜索视图:切换终端

100%工作设置…

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

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