如何让集成的 VSCode 终端不捕获 CTRL-E、CTRL-X 和 CTRL-A?
How can I have the integrated VSCode terminal not capture CTRL-E, CTRL-X, and CTRL-A?
如何让集成的 VSCode 终端不捕获 CTRL-E、CTRL-X 和 CTRL-A?
实际行为:键盘快捷键通常在终端外执行的操作
预期行为:
CTRL-X-E 应该在集成终端中打开 $EDITOR,就像在基于 Readline 的终端中一样
我从命令面板中选择查看 JSON 键盘快捷键,然后将其输入到生成的文件中:
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+e",
"command": "ctrl+e",
"when": "terminalFocus"
},
]
这允许我在终端处于焦点状态时在终端中使用 CTRL+E,而不是由 VS Code 解释它。
修改vscode settings.json
以避免Ctrl + E
冲突:
{
"terminal.integrated.commandsToSkipShell": [
"-workbench.action.quickOpen"
]
}
查找其他命令ID:Ctrl + K , Ctrl + S
打开“键盘快捷键”,按Alt + K
然后记录冲突的组合键。
每“Ctrl + e in integrated terminal (bash) when focused brings up command drop down”...
This is happening because ctrl+e is a default for the
workbench.action.quickOpen command which is special cased to bypass
the terminal. To get the behavior you want you will need to remove the
keybinding by adding this to your keybindings.json:
{ "key": "ctrl+e", "command": "-workbench.action.quickOpen" }
我仅在版本 1.64.2 上针对 Ctrl+e
测试了上述内容。
如何让集成的 VSCode 终端不捕获 CTRL-E、CTRL-X 和 CTRL-A?
实际行为:键盘快捷键通常在终端外执行的操作
预期行为:
CTRL-X-E 应该在集成终端中打开 $EDITOR,就像在基于 Readline 的终端中一样
我从命令面板中选择查看 JSON 键盘快捷键,然后将其输入到生成的文件中:
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+e",
"command": "ctrl+e",
"when": "terminalFocus"
},
]
这允许我在终端处于焦点状态时在终端中使用 CTRL+E,而不是由 VS Code 解释它。
修改vscode settings.json
以避免Ctrl + E
冲突:
{
"terminal.integrated.commandsToSkipShell": [
"-workbench.action.quickOpen"
]
}
查找其他命令ID:Ctrl + K , Ctrl + S
打开“键盘快捷键”,按Alt + K
然后记录冲突的组合键。
每“Ctrl + e in integrated terminal (bash) when focused brings up command drop down”...
This is happening because ctrl+e is a default for the workbench.action.quickOpen command which is special cased to bypass the terminal. To get the behavior you want you will need to remove the keybinding by adding this to your keybindings.json:
{ "key": "ctrl+e", "command": "-workbench.action.quickOpen" }
我仅在版本 1.64.2 上针对 Ctrl+e
测试了上述内容。