Visual Studio Hacks [Electronic resources]

Andrew Lockhart

نسخه متنی -صفحه : 172/ 48
نمايش فراداده

Hack 23. Enhance the Tabs in Visual Studio

Visual Studio's tabs can get crowded. Use a free add-in that can cut the number of tabs in half.

One of the more frustrating things about Visual Studio is that, when you have a dozen or so files open, you've got double that for files having multiple tabs for code-behind or design, and you end up with a huge list of tabs that you have to navigate through. This is time consuming and somewhat annoying. There is a freely available add-in that works to alleviate some of this pain, though. The add-in, called VSTabs and written by Jonathon Payne, can be downloaded from http://www.zero-one-zero.com/vs.

This tool is referred to as a Technical Preview by its author. For the most part, this add-in works perfectly, but you may encounter a bug or two. Luckily, the code for the add-in is available, so if you want to fix the bug yourself, you can do so.

Once you have downloaded and installed the add-in, you will see a new tab along the top of the document window. The new tab can be seen in Figure 3-18.

Figure 3-18. VSTabs

Notice how the new tab groups the design view and the .cs view for Form1 under a single tab. You can switch between the two by simply clicking on that section of the tab, and that document will be loaded. The tab control will group documents under the same tab whenever there are two views for the same filethis includes ASP.NET pages, Windows Forms, and web services.

This add-in also adds another piece of functionality. It allows you to close a tab by clicking on it with the middle mouse button. If you are a user of the Firefox browser, you are probably already familiar with this type of functionalityyou can middle-click on a tab in that browser, and it will close the tab. This is another great timesaving feature, since you no longer need to select the tab and then move your mouse over to the Close button, but can instead simply middle-click on the tab.

This is a quick and easy add-in to install and start using right away.