ベストアンサー1
2021 年 2 月更新: VSCode v1.53.0 以降でタブ折り返しが組み込まれました
- 設定で
workbench.editor.wrapTabs
を設定するだけです。true
- 私は、使用状況に応じてタブを小さくするために、以下に示す設定を引き続き使用しています。
2020 年 3 月 28 日に VSCode v1.43.2 に更新されました
- タブを閉じるボタンの CSS を修正しました
- より小さなパンくずリストとアクションバー(タブバーの右側)用の CSS を追加しました
Visual Studio Code の複数行タブに対して、次の操作を実行します (公式サポートまたはより簡単な解決策が提供されるまで)。
ステップ1:拡張機能をインストールするVSCode カスタム CSS(適切なインストール手順については拡張機能のページをご覧ください。VSCode は内部 CSS の変更を公式にはサポートしていないため、これはちょっとしたハックです。)
ステップ2:CSSファイルを作成します(例えば、「/home/user/vscode/custom.css」)に次の内容を追加します。
/* Following CSS to wrap the tab-bar into multiple rows: */
.tabs-and-actions-container > .monaco-scrollable-element {
height: auto !important;
}
.tabs-and-actions-container > .monaco-scrollable-element > .tabs-container {
height: auto !important;
flex-wrap: wrap;
}
/* Following CSS to make the tabs thinner/smaller (so that they take lesser vertical space): */
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab {
height: 25px;
padding-left: 4px;
font-size: 0.8em; /* smaller font-size for tab icons and label */
}
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab .label-name {
font-size: inherit !important; /* inherit updated font-size for label */
}
/* Following CSS for smaller close button on tabs: */
.monaco-workbench .part.editor>.content .editor-group-container>.title .tabs-container>.tab>.tab-close {
width: 20px;
}
.monaco-workbench .part.editor>.content .editor-group-container>.title .tabs-container>.tab>.tab-close .action-label {
height: 12px;
width: 12px;
background-size: 12px;
}
.monaco-workbench .part.editor>.content .editor-group-container.active>.title .tabs-container>.tab>.tab-close .action-label.codicon {
font-size: 12px;
}
/* OPTIONAL: Following CSS for smaller breadcrumbs (below tab-bar) */
.monaco-breadcrumbs {
font-size:0.65em;
opacity: 0.8;
height:18px !important;
}
.tabs-breadcrumbs .breadcrumbs-control {
height: 18px !important;
}
.monaco-workbench .symbol-icon.block {
height: 8px;
width: 8px;
min-height: 8px;
min-width: 14px;
background-position: 50%;
background-size: contain;
}
.breadcrumbs-control .monaco-breadcrumb-item:before {
min-width: 12px !important;
height: 12px !important;
background-size: contain !important;
}
/* OPTIONAL: Following CSS for smaller action-bar (beside the tab-bar) with menu, split, etc. */
.monaco-workbench .part.editor>.content .editor-group-container>.title .editor-actions {
height: 20px;
padding:0;
}
.monaco-workbench .part.editor>.content .editor-group-container>.title .editor-actions .action-label, .monaco-workbench .part.editor>.content .editor-group-container>.title .title-actions .action-label {
height: 20px;
line-height: 20px;
min-width: 14px;
background-size: 8px;
}
.tabs-and-actions-container > .editor-actions > .monaco-toolbar > .monaco-action-bar > .actions-container {
max-width:60px;
flex-wrap:wrap;
}
ステップ3:拡張機能をカスタムCSSにポイントします。VSCodeを開きます設定.json [ Ctrl+ Shift+ P> "設定を開く(JSON)"]次の行を追加します (custom.css ファイルへのパスを含む)。
"vscode_custom_css.imports": [
"file:///home/user/vscode/custom.css"
],
"vscode_custom_css.policy": true
ステップ4:必ずVSCode カスタム CSS拡張機能の Readme を読み、適切に有効にしてください。VSCode をリロードする必要があるかもしれません。また、好みに応じて CSS を編集してください。
クレジット:この解決策(タブバーを複数行にラップする拡張機能とCSSへのリンク)は、もともとスティーブン・レイドローこのGithubスレッド小さいタブ用に CSS を拡張しました。