2
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

mac限定の機能です

VSCode (というよりmacOS) には複数のウィンドウを1つにまとめる機能があります.普段VSCodeのウィンドウが迷子になるエンジニアには大変おすすめの機能です

設定は非常に簡単です.settings.jsonに次の項目を追加します

{
  "window.nativeTabs": true,
}

複数のウィンドウを開いた状態で,ツールバーの Window > Merge All Windows を実行すれば全てのウィンドウを統合できます

image.png

統合するとウィンドウがタブとして画面上部に表示されます

image.png

ウィンドウ間の切り替えをショートカットに登録しておくと便利です.keybindings.jsonの次の項目で設定できます

[
    {
        "key": "alt+[",
        "command": "workbench.action.showPreviousWindowTab"
    },
    {
        "key": "alt+]",
        "command": "workbench.action.showNextWindowTab"
    }
]

追加でsettings.jsonにこのへんも書いておくと便利です

{
    // 画面上部がごちゃごちゃになるのでタイトルバーを非表示にする
    "window.customTitleBarVisibility": "never",
    // 現在アクティブなウィンドウが上書きされてしまうので新しいウィンドウで開くようにする
    "window.openFoldersInNewWindow": "on",
    // ファイルであれば現在のウィンドウで開いて問題ない
    "window.openFilesInNewWindow": "off"
}

おまけ

VSCodeのターミナル上であれば,codeコマンドを実行した際に別のタブとしてディレクトリを開けます.たいへんに操作感が良いです

image.png

image.png

ちなみにcodeコマンドに-aオプションを指定すると,ディレクトリをワークスペースとして開くことができます.上手く使い分けましょう

image.png

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