Blorgbeard
Blorgbeard

Reputation: 103525

How do I get a code window to split vertically in Visual Studio 2008? (not HTML mode)

In Visual Studio 2008, it seems that Window -> Split only gives me a horizontal split, and Window -> New horizontal tab group does not allow me to edit the same file in both panes.

Note that I am talking about C# code windows, not HTML editing mode.

I want to edit the same file in two horizontally arranged panes.

Is this possible? Free add-ons are fine.

Edit: I have CodeRush Express installed, and it seems to have done something to my code window borders.

Edit #2: It's not CodeRush. I tried on VM with no CodeRush, and I have exactly the same issue.

Upvotes: 33

Views: 18616

Answers (6)

Chris
Chris

Reputation: 4083

In VS2010 I couldn't find the Vertical Tab group button. The workaround is:

1. Open Fullscreen mode
2. Click and drag the window to the far right (or left) and it should give  
   you an option to view both windows side by side.
3. Exit full screen mode and you should now have the ability to click and  
     drag windows between vertical tab groups, and it even now allows you to  
     drag to a new vertical tab group.

No idea why you have to jump into fullscreen first, and i seem to remember not having to do that before.

Upvotes: 2

Alverto
Alverto

Reputation: 49

I found this nifty add on tool for VS 2012 that allows you to compare two files at the same time and make changes.

Check this out:

Upvotes: 0

Rob
Rob

Reputation:

I like the vertical tab group option. The only thing that bothers me about it is that I cannot put the solution explorer on both windows (Or properties for that matter). I have to navigate all on one side and move screens around.

Upvotes: 0

Blorgbeard
Blorgbeard

Reputation: 103525

Ok, I found the solution here.

The answer is:

  1. Window -> New Window
  2. Window -> New Vertical Tab Group

This duplicates the current tab so you'll get [Form1.cs:1] and [Form1.cs:2] tabs; and then you can use a vertical tab group to view them side by side.

Upvotes: 71

Dustin Campbell
Dustin Campbell

Reputation: 9855

As a one-time developer on CodeRush, I doubt that this would be caused by CodeRush Xpress. I'm currently running the latest beta of CodeRush 9.1.0 on Visual Studio 2008, and splits are working fine. However, you could certainly try uninstalling CodeRush Xpress to see if that clears up the problem. If it does, I would recommend posting in DevExpress' peer-to-peer forums.

alt text http://diditwith.net/content_images/CRXSplits.png

Upvotes: 1

Eclipse
Eclipse

Reputation: 45533

I believe that it's not CodeRush's fault. A vanilla 2008 install only lets you do the split view with one file on the top and one file on the bottom. The only side-by side option is the horizontal tab-group feature (with the problem of only having a file open in one of them, as you mentioned.)

The obvious workarounds would be to either make a read-only copy of the file elsewhere and use that in one tab-group, or open up a second instance of VS. It does have decent handling of files that get changed in other apps, so having the same file open in two instances isn't a problem.

Upvotes: 2

Related Questions