5
0

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 1 year has passed since last update.

VSCode ターミナル上で CTRL + n, CTRL + p を有効にする

Last updated at Posted at 2021-12-20

何番煎じかわからないですが、自分が使っている設定を📝しておきます。
VS Code のターミナル上のキーバインドを設定して、いい感じにターミナルを操作するやり方です。

設定方法

  1. VSCode上で、コマンドパレットを開く (CTRL + Shift + P)
  2. key json と入力するとメニューが絞り込まれる。 基本設定:キーボードショートカットを開く(JSON) を選択。
    image.png

設定内容

以下の設定内容を記載します。

// 既定値を上書きするには、このファイル内にキー バインドを挿入します
[
    {
        "key": "ctrl+p",
        "command": "cursorUp",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+n",
        "command": "cursorDown",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+f",
        "command": "cursorRight",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+b",
        "command": "cursorLeft",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+a",
        "command": "cursorHome",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+e",
        "command": "cursorEnd",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+d",
        "command": "deleteRight",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+h",
        "command": "deleteLeft",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+k",
        "command": "deleteAllRight",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+m",
        "command": "type",
        "args": { "text": "\n"},
        "when": "terminalFocus",
    }
]
5
0
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
5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?