Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I pin a tabbed document in Visual Studio 2010?

Is there any way to "pin" a document into a fixed position? I want to keep the "Source Control Explorer" tab on the far left and always open new documents to the right of it.

However, VS 2010 tends to add documents at the very left. I want "Source Control Explorer" on the very far left so I always know where to find it.

like image 786
gonzobrains Avatar asked Mar 12 '13 09:03

gonzobrains


1 Answers

I can think of two different ways of doing this. The first one uses only options that are built into Visual Studio 2010 but is more limited and may not work 100% of the time. The other one requires that you install an extension, but is much more powerful, dependable, and even adds some other useful features.

  1. You can configure Visual Studio to always open new tabs to the right of existing tabs, just like a web browser would. (Personally, I prefer this option.) To do this, open the options dialog (Tools → Options), expand the "Environment" category, click on "Documents" and check the "Insert documents to the right of existing tabs" box (see screen shot).

    The key to making this work for you is to ensure that you always open the Source Control Explorer first before opening any other code windows, and then never close it. That way, it will always be on the far left, and all of the code windows you open will be inserted to the right of it.

    Like I mentioned above, the advantage of this approach is that it uses a setting built into Visual Studio and doesn't require that you install anything extra. All you have to do is flip a switch. The disadvantage is that it isn't 100% dependable—if you close the Source Control Explorer and re-open it, you'll have to remember to drag it back into position at the far left or it won't be there when you go to look for it.

  2. You can install Microsoft's Productivity Power Tools extension (available from the Visual Studio gallery), which adds the ability to pin tabs (among lots of other neat features) to the VS IDE. There's a great run-down of the features added specifically to the document tab well here, but the feature you're most interested in is pinned tabs. You can even show pinned tabs in a separate row!

    The extension adds a "Pin Tab" option to each tab's context menu

    This is as close to a perfect solution as it gets, but it does have the disadvantage of requiring you to install something extra. In some environments and for some people, that can be a deal killer. Too many extensions can also slow things down, and later versions of Visual Studio often seem to be slow enough already. (Though, for what it's worth, I use the PPT extension on about half of my VS installations and I haven't noticed that it has caused any significant issues.)

like image 173
Cody Gray Avatar answered Oct 16 '22 00:10

Cody Gray