14
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

VSCodeの統合ターミナルにおいてシェルのキーバインドを設定する

Posted at

VSCodeの統合ターミナルはシェル本来のキーバインドとVSCode側のキーバイドが衝突してシェル側でいくつか使えないキーバインドがある。
それだと辛いので設定し直してあげる。
使えないのはCtrl+f, Ctrl+e, Ctrl+pの3つ。
以下をkeybindings.jsonに追記。

keybindings.json
[
    // 統合terminalではCtrl+fをshellのキーバインドにする
    {"key": "ctrl+f",    "command": "cursorRight",
                            "when": "terminalFocus"},

    // 統合terminalではCtrl+eをshellのキーバインドにする
    {"key": "ctrl+e",    "command": "workbench.action.quickOpen",
                            "when": "!terminalFocus"},
    {"key": "ctrl+e",    "command": "-workbench.action.quickOpen"},

    // 統合terminalではCtrl+pをshellのキーバインドにする
    {"key": "ctrl+p",    "command": "workbench.action.quickOpen",
                            "when": "!terminalFocus"},
    {"key": "ctrl+p",    "command": "-workbench.action.quickOpen"},
]

これで統合ターミナルが幸せになる。

14
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?