31
votes

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.

6
Oh come on, there are thousands of questions tagged 'ide', this is programming related. - Blorgbeard
Probably best to do a search in the CodeRush FAQs if they have any. - LeopardSkinPillBoxHat
By horizontally, do you mean one on the left and one on the right? Or one on top and one on the bottom? - Eclipse
Make sure you've removed your horizontal split first before trying to find the vertical split as per LeopardSkin's answer - Scott Ferguson
Scott, does that work for you in VS2008, or are you on 2005 too? - Blorgbeard

6 Answers

67
votes

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.

2
votes

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.

2
votes

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.

1
votes

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

0
votes

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.

0
votes

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: