This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

Visual Studio
VS 2003+

Visual Studio Split Code Editor

It is common, when developing code, to want to see two parts of the same code file at the same time for comparison purposes. Visual Studio permits you to split the code editor window into two parts so that you can achieve this.

Code Editor Splitter Control

When viewing code in Visual Studio, you may want to see two sections of the same file at the same time. Visual Studio provides a "split screen" style view to allow you to do this. This is controlled using the splitter control. At the top-right of each code editor window you will see a grey button above the vertical scroll bar as highlighted below:

Visual Studio Splitter

If you point at the splitter the mouse pointer changes shape to indicate that the control can be dragged vertically. If you drag the splitter downwards, the code editor window separates into two sections, each containing a view of the same file and each with a scroll bar allowing you to choose the area of the code that you wish to view. An example of this is shown in the following image:

Visual Studio Split Code Window

The split code view does limit the amount of continuous code that can be viewed. Once you no longer require this layout, you may drag the horizontal divider between the two sections to the top of the window to remove the split.

12 November 2008