Is 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 cannot find the option to do that.
Is 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 cannot find the option to do that.
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.
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 source, it works for Visual Studio 2005, 2008, and 2010. In my experience, it also works for Visual Studio 2013.
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.
Window->New Window
. –
Micrometer 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:
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:
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".
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.
In Visual Studio 2022.
To edit the same file side by side (vertically split the editing window) without actually making a new copy of the file, you:
In Visual Studio 2015:
Right click on the (file name) tab and select vertical split or horizontal split.
In newer Visual Studio versions (I can confirm this for Visual Studio 2017 15.9.55 and newer versions), you can do: Window -> Split. You can also unsplit following the same way. This will work so for the current active tab.
You can use my Task Canvas extension to look at several source files at the same time:
I know this answer is a little unrelated, but I came here because I was trying to a split with the same window. In case you're like me trying to do this, just go to Window > Split
© 2022 - 2024 — McMap. All rights reserved.
Window->New Window
. – Micrometer