0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【VSCode】1度のホットキーでサイドバーやパネルを閉じてエディタにフォーカスする方法

Posted at

1つのホットキーでサイドバーやパネルを閉じてエディタにフォーカスするにはkeybindings.jsonに以下のように記述します。

keybindings.json
  {
    "key": "cmd+e",
    "command": "runCommands",
    "args": {
      "commands": [
        "workbench.action.focusActiveEditorGroup",  //エディタにフォーカス
        "workbench.action.closeSidebar",  // サイドバーを閉じる
        "workbench.action.closePanel",  // パネルを閉じる
        "workbench.action.closeAuxiliaryBar"  // セカンダリサイドバーを閉じる
      ]
    }
  },

runCommandsを使用すると1つのホットキーに複数のコマンドを指定できます。

追記後にcmd + eを押下すると以下のようになります。

画面収録 2024-09-25 23.13.35.gif

参考

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?