Managing the Code Editor and View

The Code Editor gives you a number of ways to control the view of your code. Below is information about how to affect these views.

Changing the view mode of the IDE

Integrated development environment features an additional new view mode called Tabbed Documents which allows you to have multiple editors and documents open simultaneously and access them through tabs at the top of the Code Editor. As in past versions, you can alternatively open the environment in MDI (Multiple Document Interface) mode, where the windows are all joined together (but without the tabs), and each window can be tiled, minimized, and so forth. You can also open the environment in SDI (Single Document Interface) mode where each document has its own independent window on the desktop.

To switch between IDE view modes

  1. Select Options from the Tools menu.
  2. On the General tab, select Environment.
  3. In the Settings group box, choose one of the three view modes:

Creating New Windows

You can create multiple Code Editor windows on a single document so that you can view different parts of it simultaneously. You can also view different parts of the file simultaneously by splitting the pane vertically, but when you create a new window, you can view two different parts of the same file simultaneously in full-sized windows. New to the Code Editor, you can create a new document window in the environment.

To create a new window

When you do this in Tabbed Documents (default environment) mode, a new tab is added to the Code Editor. In the other two modes, a new window displays.

Splitting the View

A Code Editor can be split into two separate parts for easier editing.

To split a pane

  1. Click the splitter bar (located above the scroll bar).
  2. Drag the splitter bar downward.
  3. To go back to a single pane, double-click the splitter bar dividing the two panes.

The new pane contains the same document, and any changes made to it are reflected in the other pane as long as that pane displays the same place in the document.

Word wrap

When you activate Word Wrap by pressing CTRL+R and then CTRL+R again, the horizontal scrollbar is removed and lines of code that exceed the width of the Code Editor's window size automatically wrap to the next displayed line rather than scrolling off the side of the window.

To activate word wrap

  1. Select Options from the Tools menu.
  2. Click Text Editor.
  3. Open the appropriate language folder (or the All Languages folder to affect all languages).
  4. Select Word Wrap. Alternatively, pressing CTRL+R and then CTRL+R again toggles this option.

Enabling Virtual Space mode

In Virtual Space mode, the editor acts as if the space past the end of each line is filled with an infinite number of spaces, allowing code lines to continue off of the side of the visible screen area.

To enable Virtual Space mode

  1. Select Options from the Tools menu.
  2. Click Text Editor.
  3. Open the appropriate language folder (or the All Languages folder to affect all languages).
  4. Select Enable Virtual Space.

When Virtual Space mode is not enabled, the cursor wraps from the end of one line to the first character of the next line and vice-versa.

Note   Virtual Space mode is active whenever you are in Column Selection mode.

Displaying Line Numbers

You can turn on line numbering in your code. Line numbers are useful for, for example, navigating text.

Note   Turning on line numbering does not mean that the document will print with line numbers. For line numbers to print, you must select the Line numbers check box in the Page Setup command on the File menu.

To display line numbers in code

  1. Select Options from the Tools menu.
  2. On the General tab, choose All Languages and then choose Text Editor.
  3. In the Display group box, click Line Numbers.
  4. To select this option on a per-language basis, select Line Numbers in the appropriate folder. For example, to set line numbers for Visual Basic, select Line Numbers in the Display group box, Access this in Tools, Options, Text Editor, Basic, General.

Enabling Full Screen mode

You can choose to hide all tool windows and view only document windows by enabling Full Screen mode.

To enable Full Screen mode

Additional view options

There are other ways to affect the view of your code or text: