How to open new doc tab labels on the right side in Visual Studio? - visual-studio

When I open a new doc, its tab label appears on the left side of the bar. How can I make it appear on the right?

For Visual Studio 2012 and later, this setting has moved to the "Tabs and Windows" section.
Updated directions are:
Click on the "Tools" menu, and select "Options".
Under the "Environment" heading in the listbox on the left, click on the "Tabs and Windows" item.
Check the box labelled "Insert new tabs to the right of existing tabs". This should be the first checkbox in the panel, in the "Tab Well" section.

To instruct Visual Studio that you want new tabs opened to the right of existing tabs:
Click on the "Tools" menu, and select "Options".
Under the "Environment" heading in the listbox on the left, click on the "Documents" tab.
Check the box labeled "Insert documents to the right of existing tabs".

In Visual Studio 2015, this option has been moved to Options --> Environment --> Tabs and Windows.

In Visual Studio 2019, this option is still under Tools->Options->Environments->Tabs and Windows, but it has been moved down. It is now placed under Group tabs by project/path:

In Visual Studio 2017 is the same like in Visual Studio 2015.
Tools->Options->Environments->Tabs and Windows
You mus check "Insert new tabs to the right of existing tabs"

Related

Visual Studio Solution Explorer, selected file changes when I click into Main Coding View [duplicate]

In my Visual Studio 2012 Solution Explorer, when I single click a filename it opens it. This was different from Visual Studio 2010 (required a double click). Is there a way to make double-click the 'view file' command?
This is called the Preview Tab feature. To change that behavior, go to:
Tools -> Options -> Environment -> Tabs and Windows
Then look for the "Preview Tab" section, and uncheck the options therein:
Option 1: Using icon in Solution Explorer
You can enable or disable the feature in Solution Explorer using the "Preview Selected Items" button.
The icon is a Tab aligned to the right.
Option 2: Using the Options window
You can enable or disable the feature by going into Tools > Options and then Environment > Tabs and Windows.
The Single-click opens files in the preview tab text mentioned in rubber boots' answer is missing in VS 2015. Mysteriously, a search for "single click" still brings up the Environment > Tabs and Windows option.
So for VS2015 and VS2017, either click the button in Vinicius's answer, or uncheck the Preview selected files in Solution Explorer box shown in the screenshot below.
In Visual studio 12/13, easiest way is to type "single click" in quick search and than select Tabs and Windows.
And in Tabs and Windows dialogue ,uncheck "Preview selected files in solutions explorer"
Shortcut Ctrl+Alt+Home.
If you press that in a document that was just opened, it will be opened permanently.
Item -> right click -> Open With -> Source Code (Text) Editor -> press Set as Default button
It's no longer there in VS2019. You enable/disable it through "preview selected Items" in Solution Explorer.

How to prevent Solution Explorer to automatically open selected item in editor (VS 2015)?

Please note I am not talking about "Track active item in Solution Explorer".
I like that, so when I am switching editor windows, Solution Explorer automatically tracks, and made selected the item in its tree. That's cool.
Instead I am asking about the reverse automatism: When I select an item in Solution Explorer (not double click, just select), it opens and activated in the editor using a single rightest tab, in the editor pane. (usual files are stacked from left tabs).
How can I prevent this automatic opening in VS 2015?
In VS 2013 it's under Settings - Environment - Tabs and Windows - Preview Tab.

How to stop Visual Studio from opening a file on single click?

In my Visual Studio 2012 Solution Explorer, when I single click a filename it opens it. This was different from Visual Studio 2010 (required a double click). Is there a way to make double-click the 'view file' command?
This is called the Preview Tab feature. To change that behavior, go to:
Tools -> Options -> Environment -> Tabs and Windows
Then look for the "Preview Tab" section, and uncheck the options therein:
Option 1: Using icon in Solution Explorer
You can enable or disable the feature in Solution Explorer using the "Preview Selected Items" button.
The icon is a Tab aligned to the right.
Option 2: Using the Options window
You can enable or disable the feature by going into Tools > Options and then Environment > Tabs and Windows.
The Single-click opens files in the preview tab text mentioned in rubber boots' answer is missing in VS 2015. Mysteriously, a search for "single click" still brings up the Environment > Tabs and Windows option.
So for VS2015 and VS2017, either click the button in Vinicius's answer, or uncheck the Preview selected files in Solution Explorer box shown in the screenshot below.
In Visual studio 12/13, easiest way is to type "single click" in quick search and than select Tabs and Windows.
And in Tabs and Windows dialogue ,uncheck "Preview selected files in solutions explorer"
Shortcut Ctrl+Alt+Home.
If you press that in a document that was just opened, it will be opened permanently.
Item -> right click -> Open With -> Source Code (Text) Editor -> press Set as Default button
It's no longer there in VS2019. You enable/disable it through "preview selected Items" in Solution Explorer.

Visual Studio - Is there simple way to add 'Close Solution" to r-click in Solution Explorer

I can't seem to break the habit of always right clicking on the solution to try and close a solution. Then I always remember and take my mouse the great distance across the screen to find it in the File menu.
I don't use it enough to remember a keystroke.
I use VS2008, VS2010 and occasionally VS2012
I'd prefer not to build an addin just for this small task.
In Visual Studio 2010 you can:
Right click on the Tool menu and click "Customize..".
Click the "Commands" tab.
Click the "Context menu" option.
Select the "Project and Solution Context Menus | Solution".
Click the "Add Command..." button.
Select "File" in the "Categories" list box.
Select "Close Solution" in the "Commands" list box.
Move up/down as desired.
Click "Close" and enjoy.
I don't have VS 2008 or 2012 handy, but the steps should be similar.
Edit: For VS2008
Right click on the Tool menu and click "Customize..".
Click the "Toolbars" tab.
Check the "Context menu" option. (the Context Menus tool bar will appear)
Select Command Tab in the current dialog.
Select "File" in the "Categories" list box.
Select "Close Solution" in the "Commands" list box.
Drag the Command to the "Select the "Project and Solution Context Menus" in the context Menus toolbar. You can drop it anywhere on the menu or in a sub menu - ie "Project and Solution Context Menus | Solution"
Click "Close" and enjoy.
VISUAL STUDIO 2019
Here is the way to do this with COMBINATION KEYS, that it is so better than add it to toolbar or context menu :)
Go to Tools menu
Go to Options
Press Ctrl+E and search Keyboard // OR go to
Environment>Keyboard
In right side type CLOSE in search bar(below of "Show
commands containing" I mean)
Go down and select the "File.CloseSolution" from the results
Click on the box "Press shortcuts keys:" and specify your
combination's key
Be aware that Visual Studio has a lot of default combination keys and do not use any regular shortcut.( I used Ctrl+F4)
Check the "Use new shortcut in:" and select your place that want to
use this shortcut (I suggest to use GLOBAL)
Click Assign > OK > Have Fun
You can close the solution by simply clicking File->Close Solution in Visual Studio 2017

What happened to the Members/Methods combobox in Visual Studio 2010?

In Visual Studio 2008, I can see a combo box containing the members/methods defined in my class at the top of the code window:
However, I cannot see this in Visual Studio 2010! Was it removed? Can I get it back?
It's still there, you must have just inadvertently turned it off. To turn it back on, follow these easy steps:
From the "Tools" menu, select "Options".
Expand the "Text Editor" heading.
Select your language of choice (e.g., C# or VB.NET).
Check the box labeled "Navigation bar".

Resources