Scroll to expand document tabs

Dominic Nahous

When you have lots of tabs open in Visual Studio, your horizontal screen resolution determines how many fit in the document tab well. The remaining document tabs are hidden unless you configure Visual Studio to display tabs in multiple rows. Alternatively, you could switch your tab layout to vertical tabs instead of the default horizontal layout. Vertical tabs, of course, isn’t the answer for everyone, and it’s not what we’re going to talk about in today’s blog post!

Going back to multiple tab rows – enabling this feature and having multiple rows of tabs open will have an impact on your available coding space. What happens if you’re a fan of the horizontal tab layout and want an easier way to get an overview of all your open documents without giving up space in your code editor? Continue reading to learn how we addressed this issue.

Screenshot of Visual Studio highlighting the tab well showing four tabs in horizontal layout.
Figure 1: The Tab Well showing a limited number of tabs

You might already be familiar with the experience of hovering over tabs and using the mouse wheel to scroll through them in some browsers and other applications. The Custom Document Well extension brought this feature to Visual Studio in older versions. Changes in Visual studio’s architecture led to the discontinuation of this years ago. We didn’t bring back mouse wheel scrolling in that form after this change due to several reasons, one of the most predominant ones being that the feature had to be reimagined to properly function under the new architecture.

We noticed that a feature request for using the mouse scroll wheel had been gaining steam. In response, we decided to do an experiment to come up with a solution. The experiment was a success! Its capabilities have been built into Visual Studio 2022 starting in version 17.9 Preview 1.

How it works

The first time you have enough tabs open to overflow the tab well, a tooltip shows up in the document tab well. This tip indicates that the mouse scroll wheel can be used to switch between single and multiple tab row styles. If you don’t want to use this feature, just dismiss the notification, and carry on as usual.

A screenshot focusing on the notification bubble that shows when the horizontal tab well is overflowed for the first time.
Figure 2: Tab overflow notification

If you’d like to give it a try, scroll the mouse wheel down. You’ll notice that Visual Studio will then organize your tabs in multiple rows. This enables the “Show tabs in multiple rows” setting in Tools > Options > Environment > Tabs and Windows and results in an expansion of the tab well to show all open document tabs, making it easy to find any open file.

You can switch back from multiple tab rows by scrolling the mouse wheel up. This collapses the tab well to a single row of tabs and disables the “Show tabs in multiple rows” setting in Tools > Options.

Figure 3: A video demonstrating switching between tab row styles

Note that if you have a tab selected in a row other than the topmost one when you switch back to the single row view, Visual Studio may displace one or more of your least used tabs in the single row to make room to move your selected tab to the rightmost position of the single row view.

To try this out, download or update to the latest preview version of Visual Studio (v17.9 Preview 1 or newer). As always, your feedback is important to us, and we’d love to hear what you think. Please share your thoughts on Developer Community!

9 comments

Discussion is closed. Login to edit/delete existing comments.

  • Ataru Moroboshi 2

    Vertical tabs = best tabs:
    -grouping
    -coloring
    -uniform width
    -easy to see and scroll
    -does not waste vertical space

  • peter sz 3

    This is way too unintuitive. Multiple-row is okay. But please just copy from vscode for single-row tabs. It scrolls horizontally when the tabs are overflowing.

  • Fabio 2

    Believe it or not, the main reason I avoid Visual Studio unless strictly needed is that I usually have tens of tabs open, and VS makes it a pain.

    Why don’t you just do it as Notepad++? It’s almost perfect!
    – Tabs on a single row
    – You can scroll through them either by using the mousewheel or by clicking on the arrow icons in the top right corner
    – When they are too many you can click on the Window menu and see them in a vertical list, and
    – If they are too many still you can further click on “Windows…” and get a scrollable table where you can easily find the right one even if you have more than 100.

    And, tabs are rearrangeable in any order you want, which is also very important, and something that lots of IDEs do not get right.

  • CAK Cy 1

    Abandoning the Custom Document Well (new architecture or not) was a huge back-step. Users were much too satisfied with it to stop asking for the features it offered. I’m glad that VS is slowly (but steadily) re-implementing almost all of CDW’s features!

  • Alexander Gayko 1

    Hey, this feature doesn’t work with people using laptops having only a trackpad and no actual scroll wheel. Please add a button to expand/collapse the tab well to/from multiline.

    • Bill Hyde 0

      My trackpad implements scrolling by swiping up and down on the trackpad with two spread fingers.

    • Kenneth Jones 1

      Did you watch the video? It explains how to use it on a laptop…

      • Alexander Gayko 0

        Hey, no, i did not watch it. but i did just now, and didn’t see anything explaining it with a laptop – or you’re referring to another video, perhaps?

  • John Tasler 3

    It seems necessary to mention my preferred way to switch between multiple tabs. It’s at the right-most of the tab bar. The Window.ShowEzMDIFileList command. It’s been in the product for a long time. On my system, it’s mapped to Ctrl+Alt+DownArrow, although you can also access as a GUI button. See this photo, which I can’t figure out a way to include in this comment:

    Window.ShowEzMDIFileList

Feedback usabilla icon