VS代码 - 集成终端 - 在代码和终端之间切换的键盘快捷方式?
VS code - integrated terminal - keyboard shortcut to toggle between code and terminal?
关于如何在 VS Code 中的代码和集成终端之间切换的任何建议?
例如在 PowerShell ISE 中它是:Ctr+D 终端和 Ctr+I 代码
找不到与 VS Code 类似的内容。
提前感谢您的任何建议
目前,sqlaide 在 this thread 上的最后一个 post 有一个很好的答案(有效)。您打开 keybindings.json* 文件并在方括号之间添加以下文本。完成后,您可以使用 Ctrl+` 在代码和终端之间来回移动焦点。
*文件 > 首选项 > 键盘快捷键并单击 keybindings.json。
{
"key": "ctrl+`", "command": "workbench.action.terminal.focus",
"when": "!terminalFocus"},
{
"key": "ctrl+`", "command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"}
详细说明之前的答案,我想分享我的工作配置,以在有或没有全尺寸终端的情况下在代码和终端之间切换。
注意:我在 Mac、运行 VSCode EC2 实例上对此进行了测试。
settings.json
{
"multiCommand.commands": [
{
"command": "multiCommand.move2Terminal",
"sequence": [
"workbench.action.toggleMaximizedPanel",
"workbench.action.terminal.focus"
]
},
{
"command": "multiCommand.move2Code",
"sequence": [
"workbench.action.toggleMaximizedPanel",
"workbench.action.focusActiveEditorGroup"
]
}
]
}
keybindings.json
[
// Switch between Terminal and Code
{
"key": "shift+cmd+,",
"command": "workbench.action.terminal.focus",
"when": "!terminalFocus"
},
{
"key": "shift+cmd+,",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
}
// Switch to Terminal full-screen and back to Code
{
"key": "shift+cmd+.",
"command": "extension.multiCommand.execute",
"args": {
"command": "multiCommand.move2Terminal"
},
"when": "!terminalFocus"
},
{
"key": "shift+cmd+.",
"command": "extension.multiCommand.execute",
"args": {
"command": "multiCommand.move2Code"
},
"when": "terminalFocus"
},
]
关于如何在 VS Code 中的代码和集成终端之间切换的任何建议?
例如在 PowerShell ISE 中它是:Ctr+D 终端和 Ctr+I 代码
找不到与 VS Code 类似的内容。
提前感谢您的任何建议
目前,sqlaide 在 this thread 上的最后一个 post 有一个很好的答案(有效)。您打开 keybindings.json* 文件并在方括号之间添加以下文本。完成后,您可以使用 Ctrl+` 在代码和终端之间来回移动焦点。
*文件 > 首选项 > 键盘快捷键并单击 keybindings.json。
{
"key": "ctrl+`", "command": "workbench.action.terminal.focus",
"when": "!terminalFocus"},
{
"key": "ctrl+`", "command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"}
详细说明之前的答案,我想分享我的工作配置,以在有或没有全尺寸终端的情况下在代码和终端之间切换。
注意:我在 Mac、运行 VSCode EC2 实例上对此进行了测试。
settings.json
{
"multiCommand.commands": [
{
"command": "multiCommand.move2Terminal",
"sequence": [
"workbench.action.toggleMaximizedPanel",
"workbench.action.terminal.focus"
]
},
{
"command": "multiCommand.move2Code",
"sequence": [
"workbench.action.toggleMaximizedPanel",
"workbench.action.focusActiveEditorGroup"
]
}
]
}
keybindings.json
[
// Switch between Terminal and Code
{
"key": "shift+cmd+,",
"command": "workbench.action.terminal.focus",
"when": "!terminalFocus"
},
{
"key": "shift+cmd+,",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
}
// Switch to Terminal full-screen and back to Code
{
"key": "shift+cmd+.",
"command": "extension.multiCommand.execute",
"args": {
"command": "multiCommand.move2Terminal"
},
"when": "!terminalFocus"
},
{
"key": "shift+cmd+.",
"command": "extension.multiCommand.execute",
"args": {
"command": "multiCommand.move2Code"
},
"when": "terminalFocus"
},
]