Split Code Windows Vertically

Tips Search

Split Code Windows Vertically

  • Comments 11

Windows: ALT + W, N (new window); ALT + W, V (new vertical tab group)

Menu: Window | New Window; Window | New Vertical Tab Group

Command: Window.NewWindow; Window.NewVerticalTabGroup

Versions: 2005, 2008, 2010

Code: vstipEnv0063



For quite some time you have been able to split your code windows horizontally (see http://blogs.msdn.com/b/zainnab/archive/2010/03/05/split-your-windows-vstipenv0004.aspx) but did you know there is a technique you can use to split your code windows vertically?



Other File Types

These techniques do not work on .ASPX files see http://blogs.msdn.com/b/zainnab/archive/2010/12/05/vertical-split-view-vstipedit0081.aspx


Also, these techniques will not work for .XAML files. To split them vertically click the Vertical Split button in the designer:





Vertically Splitting Code Files

First, locate the tab for the file you want to split vertically:




Next, make a copy of the window by going to Window | New Window on your Menu Bar:





Finally, go to Window | New Vertical Tab Group to split the copies:





Now you have the code window split vertically in the IDE. Of course you could always rip one of the copies outside the IDE and vertically arrange them as well (http://blogs.msdn.com/b/zainnab/archive/2010/01/15/free-your-document-windows.aspx).

  • Why does this not work for VB?  C# and C++ only?!?

  • That is pretty useless advice - who needs two copies of the same code file? The point is you then need to open the other file(s) you do want to see in the second tab group, and of course close the duplicate file - in that order otherwise the second tab group disappears. Pretty annoying and badly designed IMHO.

  • bluebunny -- This DOES work in VS2012.  I just tested it and it works.  I don't recall if it works in VS2010 or not off the top of my head.

    Paul -- it's true this may be useless to you and that could be said of a lot of features.  I personally think the open button on the Previe Tab is useless BUT that is my opinion.  I've found that what is usless to one person is very important to another.  Just my .02  :)


  • Such a convenient and perfect answer. Thanks much.

  • Perfect, to the point tip, thank you!

    Paul completely misses the point. This does not create a copy of the file, but opens a second "view". You can then view the same file side-by-side to compare two functions in the same file etc. which on modern days' "wide" monitor formats makes more sense than the built-in "on-top-of-each-other" splitview.

  • I disagree Paul. Sometimes you are scrolling all the time between 2 functions in the same file, so if you can see them both at the same time (vertically arranged) it's just what you need.

    Great tip!

  • Any idea about how to navigate the secondary window to the working windows position? ("Equalize" what code is being viewed in the to panes.)

    Say you want to "peek definition" via the real F12 and not Alt-F12, but don't want to loose your working position.

  • Can anyone tell me how can one divide the screen to see two different results of the code?

  • This is a good feature. But when I restart visual studio 2010 (or open it the next day..) my vertical tabs become HORIZONTAL (which I don't like). Is this a feature or bug and how to solve this?

  • It's a nice start, but it's also half useless without sharing keyboard shortcuts on how to swap between the two views.

    Sara, from what i understand of your question, this entire post was an answer to your question. Either you didn't understand the article or i am totally missing what you are asking. I'm guessing it's more likely that i don't understand what you are asking, but i share this in case others might have the same problem understanding your question.

  • Humilulo, if by "swapping between two views" you mean changing a focus from one opened file to another then "Ctrl + Tab" and "Ctrl + Shift + Tab" do the job.

Page 1 of 1 (11 items)
Leave a Comment
  • Please add 3 and 6 and type the answer here:
  • Post