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

被刻印的时光 ゝ 提交于 2019-12-09 04:31:07

问题


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.


回答1:


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:


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.




回答3:


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.




回答4:


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




回答5:


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.




回答6:


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:



来源:https://stackoverflow.com/questions/672110/how-do-i-get-a-code-window-to-split-vertically-in-visual-studio-2008-not-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!