如何在 VS Code 的集成终端中将 ctrl+f 发送到 shell?
How to send ctrl+f to shell in VS Code's integrated terminal?
我在 VS Code 的集成终端中使用 fish
shell,我想将组合键 ctrl + f
发送到 terminal/shell 而不是触发 VS Code 的find
终端中的函数。我该怎么做?
我浏览了 VS Code 的文档并找到了以下设置,但我不确定如何使用它们来实现我的目标:
// Dispatches most keybindings to the terminal instead of the workbench, overriding `terminal.integrated.commandsToSkipShell`, which can be used alternatively for fine tuning.
"terminal.integrated.sendKeybindingsToShell": false,
// A set of command IDs whose keybindings will not be sent to the shell but instead always be handled by VS Code. This allows keybindings that would normally be consumed by the shell to act instead the same as when the terminal is not focused, for example `Ctrl+P` to launch Quick Open.
"terminal.integrated.commandsToSkipShell": [
// Ensure the toggle sidebar visibility keybinding skips the shell
"workbench.action.toggleSidebarVisibility",
// Send quick open's keybinding to the shell
"-workbench.action.quickOpen",
],
我不想将 所有 键绑定发送到 shell,只是 ctrl + f
除了默认设置。这是文档的 link:https://code.visualstudio.com/docs/editor/integrated-terminal#_keybindings-and-the-shell. This answer isn't what I want because it changes the defaults to radically. I just want a small change:
这个有效:
"terminal.integrated.commandsToSkipShell": [
"-workbench.action.terminal.focusFind"
],
documentation does not work for me (I opened an issue 中进一步列出的解决方案)
// WARNING: THIS DOES NOT WORK FOR ME
// Windows/Linux
{ "key": "ctrl+f", "command": "-workbench.action.terminal.focusFind",
"when": "terminalFocus" },
// macOS
{ "key": "cmd+f", "command": "-workbench.action.terminal.focusFind",
"when": "terminalFocus" },
我在 VS Code 的集成终端中使用 fish
shell,我想将组合键 ctrl + f
发送到 terminal/shell 而不是触发 VS Code 的find
终端中的函数。我该怎么做?
我浏览了 VS Code 的文档并找到了以下设置,但我不确定如何使用它们来实现我的目标:
// Dispatches most keybindings to the terminal instead of the workbench, overriding `terminal.integrated.commandsToSkipShell`, which can be used alternatively for fine tuning.
"terminal.integrated.sendKeybindingsToShell": false,
// A set of command IDs whose keybindings will not be sent to the shell but instead always be handled by VS Code. This allows keybindings that would normally be consumed by the shell to act instead the same as when the terminal is not focused, for example `Ctrl+P` to launch Quick Open.
"terminal.integrated.commandsToSkipShell": [
// Ensure the toggle sidebar visibility keybinding skips the shell
"workbench.action.toggleSidebarVisibility",
// Send quick open's keybinding to the shell
"-workbench.action.quickOpen",
],
我不想将 所有 键绑定发送到 shell,只是 ctrl + f
除了默认设置。这是文档的 link:https://code.visualstudio.com/docs/editor/integrated-terminal#_keybindings-and-the-shell. This answer isn't what I want because it changes the defaults to radically. I just want a small change:
这个有效:
"terminal.integrated.commandsToSkipShell": [
"-workbench.action.terminal.focusFind"
],
documentation does not work for me (I opened an issue 中进一步列出的解决方案)
// WARNING: THIS DOES NOT WORK FOR ME
// Windows/Linux
{ "key": "ctrl+f", "command": "-workbench.action.terminal.focusFind",
"when": "terminalFocus" },
// macOS
{ "key": "cmd+f", "command": "-workbench.action.terminal.focusFind",
"when": "terminalFocus" },