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
First of all - GREAT WORK! I'd like to suggest one small feature. As one of new features is the ability to switch between tab using Ctrl+Num Pad number shortcut, I think it'll be nice to display a small number on the tab which represents the key shortcut to it.
Thanks a lot.
I love this add in, especially being able to drag code windows to my second monitor and have all the code windows tabbed, instead of having to move windows around to find out what is on my second monitor. One suggestion; With Windows 7, when I move the code window to the second monitor, I have gotten used to just pushing the window up to the top border of the monitor, so that it maximizes in that monitor. With your add in, when I drag windows from the main IDE onto the second monitor, and drag to the top border of the monitor, it still has the multiple windows, instead of adding it to the tab.
It would be nice that if I move a code window to a different monitor, and a code window is already maximized on that monitor, the window I am dragging would automatically be added as a tab on the code window that is already maximized on that window.
I can not thank you enough for this!!! I wanted LRU tab closing and alphabetization so badly!!!!!!!
So awesome.... THANK YOU!!!!
Alright, this is... extremely useful. A coworker asked if I knew of any addon that forced a maximum width on tab labels, so I went and found one. Turns out it also came with several other features I didn't know I needed until they were mentioned - sort by usage, coloring by project, and especially pinning. (I have no interest in pinning folders in my OS taskbar, but I *definitely* have interest in pinning files in VS.)
My only complaint is that I couldn't really find any descriptions of what all the options did, and had to resort to guesswork/trial and error... mouseover text on the options page, or at least a link to a useful help page, would be nice.
Our team would also love to see an option to disable being able to drag tabs into a floating state with the mouse, as opposed to explicitly requesting that state - a couple people have complained that they're always accidentally floating items they just meant to select (see also: stackoverflow.com/.../how-to-disable-floating-tabs-in-visual-studio-2010). Might that be something you could add in a future version?
(I should edit - some of the options were described here; just not all of them.)
Thank you all for your feedback!
@Mariusz: Glad you like it. Adding numbers to the tabs seems like it would be helpful, we will consider it for future versions.
@Greg: Interesting suggestion. We will consider it too for future versions.
@Jon Kragh: Glad that you like it.
@neminem: It is probably not very noticeable, but there is a link at the top of the page to a second blog post that describes the options that do not appear in this one. Before those options were hidden, but now they are all available from the configuration dialog. I do need to take the time to update this post and put them all together in a single page.
Disabling floating on double click has been suggested to us before. We will indeed consider adding it to future versions of the extension.
And as Alexander Kant already said, the UseMRUDocOrdering Option would be great... :)
Another thing I just noticed... I work with 4 monitors, and typically have visual studio on one, and then three separate code windows maximized on the other 3 monitors.
When I play/debug a project, all the code windows, besides the Visual Studio window, move to not-full-screen. And then when I am done, I have to go to each code window and re-maximize them.
I'm sure it works the same in a 2 or 3 monitor setup as well.
One quirk I noticed. I have a solution that contains VB projects and Fortran projects. Color tabs by project doesn't seem to see any of the Fortran projects. They're all the same color as my first VB project.
Can we use this type of tabbing in our applications. Do we have inbuilt classes or we require to create.
This is beautiful and very awsome.
Thank you for your feedback!
@Kate: We are looking into adding this in future versions.
@Greg: This is unfortunately a known bug. It will be fixed in the next release of the Pro Power Tools, due out in a couple of weeks.
@Charlie: I am imagining this is due to diferences in the project system for the Fortran projects. What Fortran compiler/project system support are you using for VS?
@Gaurav: Glad that you like it. There is unfortunately no code we can make public for the extension, as we rely heavily on modifying our own VS 2010 code in order to provide the functionality.
In spite of uninstalling I still see the drop down menu on my Visual Studio. How do I get rid of it. Thanks
@Madhu: If you are referring to the drop down menu at the top right of the document well that shows you the currently open files, that is standard behavior in VS 2010. If you are referring to a different drop down menu please clarify which one is the one you want to get rid of.
One thing I would love to see is a floating document tab well, my current set up involves a small primary screen and I can't fit enough tabs on it, and vertical uses way too much screen space, I would love the vertical tab list to be on my other, more sizeable monitor.
that or the ability to have a separate tab well window displaying a list of open tabs, like the drop down but undockable.