Comfortable shortcut operations such as Ctrl + P in VS Code terminal

Needless to say, VS Code terminal is very convenient, but by default, using shortcuts such as Ctrl + p makes shortcuts on the VS Code side work, which is too inconvenient. By setting as follows, a specific shortcut can be prioritized on the terminal side.

1. Open settings

Open the VS Code Command Palette (Shift + Ctrl + p for Windows / Linux) and open the Keyboard Shortcuts settings. (You can also use Ctrl + k-> Ctrl + s as shown) image.png (To be on the safe side, ⌘ + Shift + p on macOS)

2. Identify

When the shortcut list is displayed, search the search window at the top for the shortcut you want to prioritize the operation on terminal. The example below finds Ctrl + e. image.png (Ctrl + e is a shortcut that jumps to the end of the input with shell, isn't it?)

3. Set

Open the context menu (right-click menu) for the desired shortcut and edit "When Expression". Enter the watchword "! TerminalFocus" here to "ignore when in terminal". image.png

4. Try

Go to terminal, press the shortcut you set, and make sure the focus isn't shifting to VS Code.

that's all.

Recommended Posts

Comfortable shortcut operations such as Ctrl + P in VS Code terminal
Write Spigot in VS Code