在 vscode 中,我设置了
ctrl + e
打开文件资源管理器:
{
"key": "ctrl+shift+e",
"command": "-workbench.view.explorer",
"when": "viewContainer.workbench.view.explorer.enabled"
}
这工作正常,除了当我在终端中输入“ctrl + e”时,我得到:
C:\mypath> ^E
“ctrl + e”似乎被终端吞没了。在这种情况下,终端 (PowerShell) 甚至没有使用键盘快捷键执行任何有用的操作。
如何使用“ctrl+e”从终端打开文件资源管理器?
我尝试过使用 bash 和 PowerShell。我期望 VS Code 能够捕获快捷方式,因为 PowerShell 没有用它做任何有用的事情。
将命令
workbench.view.explorer
添加到设置:Terminal> Integrated: Commands to Skip Shell
。
并修复你的按键绑定 - 去掉命令之前的
-
,这只会禁用该命令。您的按键绑定应该是:
{
"key": "ctrl+e",
"command": "workbench.view.explorer",
"when": "viewContainer.workbench.view.explorer.enabled"
}