Visual Studio Tab Management
By default, if you open a new file you get a new tab in your document window. After awhile, you can end up with forty two open tabs. To get things back under control, you have to use the Windows | Close All Documents choice, or right-mouse click on the one tab you want to keep open and select the Close All But This option).
If you want, you can have Visual Studio open any new document in your current window (provided that the current window has no unsaved changes). So, when you double-click on a file in Solution Explorer, the current window's content is replaced with the content of the file you just opened. You only get a new tab if the file in the current window has unsaved changes.
To turn this feature on, go into Tools | Options and in Environment | Documents check the "Reuse current document window, if saved" option.
Taking advantage of the feature does require a different mindset. When I use this feature, I start off by opening new tabs until I do a build or a debug (that saves all of my current changes). After that, when I open a new file, that new file replaces the file in the current tab. I find that I start searching my currently open tabs for "Which file do I want to get rid of?" I then select that file's tab and open a new file. It keeps the number of tabs under control, but it is a different way of working.
Do you have a Visual Studio tip, you'd like to share? Send it to me at [email protected].
Posted by Peter Vogel on 04/26/2011