Split Code Windows Vertically

Tips Search

Split Code Windows Vertically

  • Comments 7

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:

clip_image002

 

 

 

Vertically Splitting Code Files

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

clip_image004

 

 

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

clip_image006

clip_image008

 

 

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

clip_image010

clip_image012

 

 

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  :)

    Z

  • 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.

Page 1 of 1 (7 items)
Leave a Comment
  • Please add 1 and 8 and type the answer here:
  • Post