views:

1022

answers:

5

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.

+3  A: 

Hard to explain without a screenshot, but:

  1. Hover your mouse near the top of the vertical scroll bar on the right of the screen, until the cursor turns into an Up/Down arrow with a bar in the middle.

  2. Drag the window down to create a split.

  3. Bingo!

This works for me in VS2005 - I am not using VS2008.

LeopardSkinPillBoxHat
I tried that, but it doesn't work for me!
Blorgbeard
Hmmm...I'm using VS2005 and it works for me. Something must have changed in VS2008.
LeopardSkinPillBoxHat
+2  A: 

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.

Eclipse
Yeah, that would work. It would be nice to not have to do either of those though.
Blorgbeard
+1  A: 
Dustin Campbell
You're right, it wasn't coderush. However, my problem is with getting a *horizontal* split - ie, two panes side by side. Also this is with a windows forms project, not web.
Blorgbeard
@Dustin - this is waaaay OT, but.... Would you mind sharing your VS color scheme? I code on the dark side as well and wouldn't mind trying out another color scheme and from your screen shots, you have some attractive base colors.
Metro Smurf
Ditto, actually :)
Blorgbeard
I'm using the Faculty of the Mind theme along with the Envy Code R font:http://iridescence.no/post/The-Official-Faculty-of-The-Mind-Visual-Studio-Theme.aspxhttp://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released
Dustin Campbell
Thanks Dustin; I've been using a derivation of http://www.darksideofvisualstudio.net I'll give the Faculty of the Mind theme a whirl.
Metro Smurf
+5  A: 

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.

Blorgbeard
A: 

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.