Preventing Tab Bloat with Visual Studio 2012

Posted Sat, Sep 1 2012 17:26 by Deborah Kurata

As you debug your project, stepping through the code, you often end up with lots and lots of opened tabs in Visual Studio. With all of those tabs opened, it is hard to keep track of the tabs that are important.

Visual Studio 2012 provides two features to help with this issue:

  • Tab pinning
  • Tab preview

Tab Pinning

To pin a tab, click the pin icon on the tab to the left of the close (x) icon. Or you can use the menu: Windows | Pin Tab. Or select Pin Tab from the tab's context menu.

image

The pinned tabs are pinned to the left in the Tab Well and will stay on the left. Newly opened tabs will appear to the right of the pinned tabs.

image

If you end up with too many tabs opened, you can right-click on one of the pinned tabs and select Close All But Pinned. That leaves you with just the tabs you wanted.

The way the tab pinning works can be adjusted using Tools | Options.

image

Tab Preview

Visual Studio 2012 provides a special single tab in the right side of the Tab Well called the Preview Tab (shown in purple in the screen shot below). When a code file is opened in the Preview Tab, it replaces the prior contents of that tab. That helps prevent tab bloat.

image

There are several ways to open a code file in the Preview Tab:

  • Select the Preview Selected Items button on the Solution Explorer toolbar (shown with a blue outline in the screen shot below). Then single click on any file in Solution Explorer to view it in the Preview Tab. (Double-click on a file to open it in a normal tab.)

image

NOTE: Clicking on a designer, such as Windows Forms, in Solution Explorer does not open the file in the Preview tab.

  • Single click on any file in the Find Results window to open it in the Preview tab. (Double-click to open it in a normal tab.)
  • Step through code in the debugger. Any code file that is opened as you step through is opened in the Preview Tab.

If you want to move a code file from the Preview Tab to a normal tab, click the Keep Open icon on the tab. The Keep Open icon is the icon just to the left of the close (x) icon.

The way the Preview Tab works can be adjusted using Tools | Options (see the screen shot earlier in this post).

Adjust these features to match the way you work with Visual Studio and minimize your tab bloat.

Enjoy!

Filed under: , , ,

Comments

# Solution Explorer in Visual Studio 2012

Sunday, September 09, 2012 5:53 PM by Deborah's Developer MindScape

There are lots of new Solution Explorer features in Visual Studio 2012, so many that they did not all

Leave a Comment

(required) 
(required) 
(optional)
(required) 
If you can't read this number refresh your screen
Enter the numbers above: