0
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 3 years have passed since last update.

VSCodeのエクスプローラで「新規ファイル&フォルダ」ショートカットを作成(Windows)

Posted at

VSCode のエクスプローラで新しいフォルダやファイルを作成するとき、マウスを使って新しいフォルダを作成していました。このマウスでの作業をラクできるように、今回は、VSCode のエクスプローラ上で、指定したフォルダに「新規ファイルとサブフォルダ」を作成できるショートカットを設定します

設定手順

1, コマンドパレットを開いて Preferences: Open Keyboard Shortcuts (JSON)を開く

「表示」→「コマンドパレット」を選択して、Preferences: Open Keyboard Shortcuts (JSON) を入力選択し keybindings.json を編集できるようにします。

2, keybindings.json を編集

開いた keybindings.json を以下のように編集します。"key" の値の部分はショートカットコマンドになります。

(注) 今回はWindowsでコマンド設定していますので、Ctrl を使用しています

keybindings.json
// 既定値を上書きするには、このファイル内にキー バインドを挿入します
[
    {
        "key": "Ctrl+n",
        "command": "explorer.newFile"
    },
    {
        "key": "Ctrl+shift+n",
        "command": "explorer.newFolder"
    },
]

3, エクスプローラ上で、指定のコマンドして動作確認

VSCode のエクスプローラで対象のフォルダを選択し、「2」で設定したコマンドで新しいファイルやフォルダが作成できるかどうか確認します。

0
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
0
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?