I'm using the fish
shell inside VS Code's integrated terminal and would like to send the key combination ctrl + f
to the terminal/shell instead of triggering VS Code's find
function in the terminal. How do I do this?
I went through VS Code's documentation and found the following settings, but I'm not sure exactly how to use them to achieve my goal:
// 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",
],
I don't want to send all keybindings to shell, just ctrl + f
in addition to defaults. This is the link to the the documentation: 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: https://stackoverflow.com/a/65122041/7483211
This works if put in keybindings.json
"terminal.integrated.commandsToSkipShell": [
"-workbench.action.terminal.focusFind"
],
The solution that's listed further down in the documentation does not work for me (I opened an issue for this)
// 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" },