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.
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.
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!
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
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.
Did you watch the video? It explains how to use it on a laptop…
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?
My trackpad implements scrolling by swiping up and down on the trackpad with two spread fingers.
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!
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...
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.
Vertical tabs = best tabs:
-grouping
-coloring
-uniform width
-easy to see and scroll
-does not waste vertical space