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.
Type “Indentation” into the search field then head to the “Editor: Tab Size” section. Replace the default space number with your preferred one: Your setting will be applied and reflected immediately. If this doesn't happen (it's a little lag sometimes), just reload or restart your VS Code.
By default, VS Code inserts spaces and uses 4 spaces per Tab key.
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",
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
.
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.
As lenooh pointed out, to have smaller tabs (what I came here for), better use
"workbench.editor.tabSizing": "shrink",
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With