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
Thanks for a very useful tool. Is it possible to extend this for SQL Management Studio to have different result set on different tab? TOAD has it and it's very useful.
It would be awesome to see "Check In Now" directly on the tab!
This is a truly awesome tool, many many thanks for producing it.
My only complaint is that sometimes, when some of my tabs are pinned and others are not pinned (maybe just after I close my program when debugging), all the unpinned documents become corruptly rendered on the screen. I'd have line numbers offset half-way on the screen, C# code missing (as if code font is white on a white background) and other strange visual issues.
They clear up only if pinning all the unpinned documents. Once this is done, I can un-pin them and they render ok.
This tool is really helpful, I just wish it would allow us to put vertical tabs on the right or horizontal tabs at the bottom.
Nevermind, I found that exact option in the Advanced Options at the top of the general document tab well options. =)
It would be great, as Dave mentions above, to have multiple tab rows (without requiring pinning etc). Scrolling isn't the most efficient way to locate open tabs sometimes. Tabs Studio already provides this, but it is a commercial product.
Thanks for the great work so far.
Thank you for a useful extension. I miss just one thing - could you provide a command to maximize current tab group? Let's say I have two horizontal tab groups; after right-clicking a tab in the bottom group, I'd like to see a command that would maximize it vertically, shrinking the top group as possible.
I'd like to use tab groups to logically separate open documents, but they take too much space, and shrinking/expanding them with mouse is terribly slow and inconvenient. The command (and a keyboard shortcut) would be very helpful...
The vertical is so good for my workflow that I cant get myself to switch to VS 2011 beta yet, since I feel that my environment is flawed without it.
Keep up the good work, and I really, _really_ hop these features will work in VS 2011 when it is released!
Am I going mental?! I got this as a way to only show document names in the tab rather than the full path, but I can't work out how to do it! please help :)
Any chance to make it work in Visual Studio 2012? PLEASE !!!!!!
I've already got Tabs Studio v3 for VS2012, because Document/Tabs Well Plus is not available for VS2012, but I miss functionality that is not available in Tabs Studio, like Coloring by project, and also that its free.
Any chance to make it open source? so we can make it work in VS2012
Thanks for a very useful a extension!!!