简体   繁体   中英

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. 在此处输入图像描述

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 .

在 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.

在此处输入图像描述

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM