The official source of product insight from the Visual Studio Engineering Team
[Update 6/21/2010]: Please go to this blog post where I describe even more configuration options that are available for this extension.[Update 7/20/2010]: Updated changes made for version 10.0.10710.22 of the Pro Power Tools. Please take a look at the changelog.
For some time, the behavior of tabs in Visual Studio's document well has been a source of frustration for some users. Whenever behavior is modified, some users are happy with the changes, while others are not. In an attempt to alleviate this problem I have created this extension, which provides configurable behavior for document tabs. It is available in the Visual Studio Gallery, as part of the Visual Studio 2010 Pro Power Tools. All configuration options are accessible by selecting Tools/Options.../Pro Power Tools/Document Tab Well. I encourage you to experiment with all available options, so you can find what works best for you.
This extension provides a fairly large feature list. To provide examples of what is possible, as well as a starting point for users to build their own configurations, we include several different presets that showcase the features available. They are the following:
Visual Studio 2008
Visual Studio 2010
This preset mimics the behavior of Visual Studio 2010.
Web Browser: Scrollable tab well
Scrollable Tab Well: Sorted by project
This preset will have scrollable tabs, sort them and color them according to the project they belong to. This is useful if you regularly work in a solution with several projects.
Vertical Tab Well: Color coded and sorted by project
This preset is similar to the previous one, but additionally tabs are shown vertically. This allows showing more tabs than is normally possible when laid out horizontally.
Dynamic Tab Well: Removes tabs based on usage
This preset showcases a modification to standard Visual Studio 2010 behavior. Instead of hiding tabs that are on the right of the tab well when there is no more space available for them, it will hide the least recently used tab.
At the moment the extension provides the following configurable behavior features:
By default, VS 2010 hides tabs when there is not enough space to display all those that are open. When a hidden tab needs to be visible, it is inserted at the beginning or the end of the tab well, according to preferences.
We provide the ability to instead scroll tabs, thus avoiding the need to change their position in the tab well whenever they become visible:
Note the arrow button on the right of the tab well. Clicking it will scroll the tabs one at a time. Keeping it pressed will continually scroll tabs until it is released.
The selected file has been scrolled to the left and is now not visible in the document well. In order to find out now what is the selected tab, we can simply press the document well drop down button:
Note that the selected tab appears in bold, and all hidden tabs appear in italics. Note that in this example the files in the drop down appear in visual order, instead of alphabetically sorted, which is the default behavior of VS 2010. This is configurable through the sorting options.
If you work with many open documents at once, you might find that showing tabs vertically allows you to have a larger number of tabs visible. You will be able to open more documents before any of them needs to be hidden.
Please note that you cannot reorder tabs when displayed vertically. My personal recommendation would be to keep them sorted alphabetically so they are easy to find.
While the objective of LRU mode is to keep your most recently used tabs available, you might want to always have some documents easily accessible, no matter how often you access them. By pinning a tab, it will always be readily available.
Let's say you have 4 files open in your project: Class1.cs, Class2.cs, Class3.cs and Program.cs. You might have something like the following image:
Notice that only 3 tabs are visible, as there is no space to show all of them. If you are mainly working on Program.cs, but have to constantly switch to the other tabs, there is a chance that the tab you mainly work on might become hidden. You will probably want to have this document always available. If a tab has to be hidden, it should be any of the others. When you hover the mouse pointer over a tab, you will notice that a pin button becomes visible. Pressing this button will pin the tab. Alternatively, press the right mouse button over the tab, in order to bring up its context menu, and select "Pin Tab" (This command is also available through the menu option Window/Pin Tab):
After selecting this command, the selected tab will become pinned. Notice that the tab has been brought to the front of the document well, and that it has a pin button to indicate its status. You can press this button to unpin the tab, or alternatively use either the tab's context menu or the Window/Pin Tab menu option:
An important note: At the moment you cannot reorder pinned tabs. They will appear in the same order they had in the regular tab strip. If you attempt to move a pinned tab it will become a floating window.
If you have several tabs pinned, you might soon run out of space in the document well to display unpinned tabs. The extension also provides an option that will use a separate row for showing only pinned tabs. If this option is turned on, our previous example will appear as follows:
Notice that now all our tabs are visible.
This setting brings back the close button that was present in the document well in Visual Studio 2008. It will close the currently active tab in the document well.
This behavior extends the default VS 2010 fixed document well. Tabs that do not fit in the available space will be hidden, but instead of hiding the tab on the right or the left of the tab well (according to preferences), the tab that will be hidden is the least recently used tab. This makes commonly used tabs available.
In the following example we have 4 tabs open. The order in which they were shown is Class1.cs, Class2.cs, Class3.cs and Class4.cs.
When the space available is reduced, the least recently used tab (Class1.cs) is hidden. If we show the tab well drop down, we can confirm that Class3.cs has been hidden but still remains between Class2.cs and Class4.cs:
If we select Class1.cs from the drop down to make it visible, the tab that will be now hidden is Class2.cs:
By default Visual Studio 2010 inserts new tabs to the left of the document well. Turning on this option will insert new tabs to the right instead. This option will have no effect if alphabetical sorting is turned on.
Please note this option is the same option that is present in Tools/Options.../Environment/Documents. It is presented in our options dialog as a convenience to our users.
Documents that belong to the same project will be grouped together in the tab well. When alphabetical sorting is on, tabs will be sorted by project first and then by name. Having this option turned on and alphabetical sort off will allow tab reordering, but only within the project group.
Whenever a tab is added to the tab well it will be inserted in its corresponding alphabetically ordered position. Naturally, this precludes tab reordering.
Default Visual Studio 2010 behavior is to display the document well drop down in alphabetical order. This option allows the dropdown to appear in the same order in which the tabs are laid out. This is particularly useful when Removal by Usage Order is turned on.
The extension provides the ability to set custom colors for document well tabs. Tabs can be colored according to:
Select Tools/Options.../Environment/Document Tab Behavior/Color Coding to configure the colors that will be used for tabs according to the project they belong to, as well as regular expressions that will be used to color tabs. Matching for these regular expressions is case-insensitive.
In the following example a red color is used for tabs that match ".*\.xaml$", a blue color is used for tabs that match ".*\[design\].*", and a green color is used for tabs that match ".*\.txt$":
In the following example we can see a solution that contains 3 projects, with coloring according to project turned on. This feature is specially useful when used with "sort tabs by project":
The extension provides the following options for configuring the UI of individual tabs:
Close all but pinned - This command (accessible through a document tab's context menu) will close all document tabs that are not currently pinned.
Please be sure to tell us your opinion about this extension and the features provided. There is a chance that the most-liked and/or useful features will be included in the next version of Visual Studio, and of course we would like to improve on any feature that our users don't find useful. You will find a hyperlink in our options dialog which you can use to provide us with feedback. You can also add comments to this post directly, add/contribute to a discussion in the Visual Studio Gallery page for the Visual Studio 2010 Pro Power Tools, or send us feedback directly at docwell2010plus [at] microsoft.com.
Note: We have received reports of problems with this extension when the Tabs Studio plug-in is installed, as they both replace default behavior in the document tab well. Their latest version has been updated to work with the Pro Power Tools. As you might imagine, Tabs Studio will supercede almost all functionality of this extension.
However, if for some reason you cannot upgrade, you can still install the Pro Power Tools and disable this extension by running the following command (from a regular command prompt, or pressing Win+R): reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\DialogPage\Microsoft.DocWellBehavior.GeneralOptions /v Behavior /t REG_SZ /d Default
This might be so obvious that it exists already and I've missed it, but can we have an option to group related files next to each other? At the moment XAML/XAML.CS and ASPX/ASPX.CS files may be several tabs apart, depending on when they were opened.
Please consider this suggestion too:
Thanks for your feedback!
@Wouter Vos: I believe whether VS tries to show the file path in the tab depends on the type of project. We will consider adding functionality to let you have more control over this.
@Marc Evans: It doesn't exist yet, but we will consider for future versions.
@Chris: That seems tricky, but I agree it could be very useful. We will consider it too for future versions.
Will be nice to add option for disable tab pinning. Or just option to hide that pin icon from tabs, cause that's waste of space on tabs for me :)
@Velibor: You might notice that we did just that in our latest version, released last Sunday :).
The extension is loaded, and working in my VS2010 however the Tools-Option-Environment-Document Tab Well settings page does not appear for me. So I cannot configure it to my liking
@james: The latest version of the Pro Power Tools has more extensions that also offer options pages. We thus moved the options page for this extension to "Tools/Options.../Pro Power Tools/Document Tab Well". I have updated the blog post to reflect this.
Hope this helps, and thank you for pointing it out.
Found it !
Hi, I want to first thank you for this incredible plugin. I particularly enjoy the pinning feature, and it's become one of my most used feature.
There is, however, one problem I'm experiencing. I often have at least 50 tabs open, and when I start and stop debugging, my visual studio cpu usage spikes to 50% and hangs there for about 1 min or so. If I close all the tabs, starting and stopping debug sessions becomes lightening fast. There appears to be a performance problem with this plugin when there are a lot of tabs open.
Hope you guys can fix this in future releases!
@Jonathan: Glad that you like it.
We have made a couple of improvements to performance when switching to/from debug mode. Please be sure to check out the next release.
This is nice but it still lacks one big feature...the ability to have 2, 3 or more rows of tabs by default without having to do pinning or other special action. Is the something that can be done in the future?
@Dave: Thank you for your feedback. This is something that we are indeed considering, it is possible you will see it in future versions.
is there any option to move documents that are already open that you visit to the leftmost position in the file tab channel? (like the UseMRUDocOrdering – registry-hack in VS 2005 / VS 2008)
It would be nice if we can color tabs with regex using the full path of a file instead of only what is displayed in the tab itself. For example, I would use this feature to colorize all tabs that come from my framework code, which is splitted in 4 different projets.
@Alexander Kant: We currently don't have that option, but we will look into adding it in future versions of the extension.
@Pat: You can do that currently. Please look at the following blog post, and look for Regular Expression Options: