Split edit window in Visual Studio

Visual Studio

Visual Studio Problem Overview


It there any way to show two editing windows in visual studio? I would like to look at two source files at the same time but I must be missing the option to do that.

Visual Studio Solutions


Solution 1 - Visual Studio

I think what you want to do is to add a new vertical tab group. The keyboard shortcut to do that is >Alt + W, V.

According to this https://blogs.msdn.microsoft.com/zainnab/2011/03/01/split-code-windows-vertically/">source</a>;, it works for Visual Studio 2005, 2008, and 2010. In my experience, it also works for Visual Studio 2013.

Solution 2 - Visual Studio

Another easy option is to open two documents, then just click and drag the tab for one of the documents and drop it on the document itself. This will display a menu that lets you move the document to a new vertical or horizontal tab group.

I find this to be the easiest and quickest way to do this.

You didn't ask in the question, but if you want to edit one document in two windows, you can grab the small area above the scrollbar and drag it down. You will now have your document open in two scrollable areas. Great for working on two sections at once.

Solution 3 - Visual Studio

To create a keyboard shortcut for "Window->New Vertical Tab Group" you need to assign a shortcut to "Window.NewVerticalTabGroup" command.
Tools->Options->Environment->Keyboard, in "Show commands containing" type "Window.NewVerticalTabGroup", and assign the keyboard shortuct in "Press shortcut keys" field.
Remember to click "Assign" before "OK".

Solution 4 - Visual Studio

In Visual Studio Community 2019 to split a document (code) and have two independent views of the code, there is a little tool in the top right corner of the display:

enter image description here

Just drag it down and you will get another viewer for the current file. To adjust the height you can grab the bar between the two views and drag. (Can be kinda tricky, just move your mouse until the mouse pointer icon changes to double arrows)

To split the view between two files just right-click on one of the files tabs (title) then in the resulting menu you can select either "New Horizontal Document Group, or New Vertical Document Group:

enter image description here

Solution 5 - Visual Studio

For Visual Studio 2012:

Move your mouse over the Class tab > Right Click on the Title of the Class > New Horizontal Tab Group or New Vertical Tab Group.

If you want to split the same class: Tools -> Options -> Environment -> Keyboard -> search by Window.Split and add a new shortcut.

Solution 6 - Visual Studio

In visual Studio 2015 right click tab part where file name is written and select vertical split or horizontal split.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionstimmsView Question on Stackoverflow
Solution 1 - Visual StudioAmadeus SánchezView Answer on Stackoverflow
Solution 2 - Visual StudioRob ProuseView Answer on Stackoverflow
Solution 3 - Visual StudioTHX-1138View Answer on Stackoverflow
Solution 4 - Visual StudioMattman85208View Answer on Stackoverflow
Solution 5 - Visual StudioIcarooView Answer on Stackoverflow
Solution 6 - Visual StudioEngineerView Answer on Stackoverflow