![](/img/trans.png)
[英]Whenever I open integrated terminal in VS code 1.18, it crashes PowerShell
[英]VS code - integrated terminal - keyboard shortcut to toggle between code and terminal?
任何建议如何在 VS Code 中的代码和集成终端之间切换?
例如,在 PowerShell ISE 中,它是: Ctr+D终端和Ctr+I代码
找不到与 VS Code 类似的东西。
预先感谢您的任何建议
目前,sqlaide 在此线程上的最后一篇文章有一个很好的答案(有效)。 您打开 keybindings.json* 文件并在方括号之间添加以下文本。 完成后,您可以使用 Ctrl+` 在代码和终端之间来回移动焦点。
*文件 > 首选项 > 键盘快捷键,然后单击 keybindings.json。
{
"key": "ctrl+`", "command": "workbench.action.terminal.focus",
"when": "!terminalFocus"},
{
"key": "ctrl+`", "command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"}
详细阐述上一个答案,我想分享我的工作配置,以便在有或没有全尺寸终端的情况下在代码和终端之间切换。
注意:我在我的 Mac 上对此进行了测试,在 EC2 实例上运行 VSCode。
{
"multiCommand.commands": [
{
"command": "multiCommand.move2Terminal",
"sequence": [
"workbench.action.toggleMaximizedPanel",
"workbench.action.terminal.focus"
]
},
{
"command": "multiCommand.move2Code",
"sequence": [
"workbench.action.toggleMaximizedPanel",
"workbench.action.focusActiveEditorGroup"
]
}
]
}
[
// 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"
},
]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.