Shinya Koizumi
Shinya Koizumi

Reputation: 1103

Visual Studio Code tab width

Is there any way to set the maximum width for the tab in visual studio code. I can specify this in visual studio 2015 when I install productivity power tool, but I want to know if this is possible with visual studio code. enter image description here

Upvotes: 60

Views: 27013

Answers (3)

Ken Palmer
Ken Palmer

Reputation: 2445

In VS Code you can access the editor's tab size settings by pressing Command+Comma (Mac) or Ctrl+Comma (PC), and typing tabsizing. You can edit settings for regular and pinned tabs.

Currently there are two options for sizing editor tabs: fit and shrink.

Dialog to edit tab sizing in VS Code

A handy shortcut is that the tab area recognizes a mouse scroll-wheel.

If you have Tab Sizing set to fit, and you have several tabs opened so that they scroll off the screen, hover your mouse pointer over a tab then scroll. This will bring more tabs into view.

It would be nice if Microsoft provided a means to stack tabs in Visual Studio Code.

2022 Update: VS Code now has a workbench setting named Wrap Tabs. To edit this press Command+Comma (Mac) or Ctrl+Comma (PC), type Wrap Tabs and check that box.

enter image description here

Upvotes: 13

Computer's Guy
Computer's Guy

Reputation: 5363

As lenooh pointed out, to have smaller tabs (what I came here for), better use "workbench.editor.tabSizing": "shrink",

Upvotes: 3

B. Cratty
B. Cratty

Reputation: 1991

The only thing I was able to find while doing some quick research on VS Code User Guide was that in the Settings editor you can change the tabWidth either to shrink or to stay large enough to view the file name.

  // Controls the sizing of editor tabs.
  //  - fit: Always keep tabs large enough to show the full editor label.
  //  - shrink: Allow tabs to get smaller when the available space is not enough to show all tabs at once.
  "workbench.editor.tabSizing": "fit",

Upvotes: 87

Related Questions