Export (0) Print
Expand All

Code and Text Editor 

The Code and Text editor is the word processor of the integrated development environment (IDE). When it is used to edit text, it is referred to as the Text Editor. When used to edit source code in a Visual Studio development language, its most common use, it is referred to as the Code Editor.

You can open multiple Code Editors to view the code in different forms or modules, and copy and paste among them. There are various ways to open the Code Editor:

To open the Code Editor from Do this

Solution Explorer

Select a form or module and click the View Code toolbar button, or double-click the form or module.

Windows form or Web form

Select the form or any of its controls and choose Code on the View menu, or right-click and choose View Code from the shortcut menu.

File menu

Choose New or Open to display a code file.

A list of all documents opened for editing in instances of the Code Editor is available in the Windows menu. The HTML Designer, CSS Editor, and XML Editor features of the IDE also employ this editor.

The Code Editor for the language in which you are developing offers such rich features as:

  • Access to object properties, methods, and events at design time.

  • IntelliSense statement completion.

  • Collapsible code sections.

  • A Code Definition Window that displays the source code for an object or element.

  • A Code Snippet Inserter that lets you add ready-made blocks of model code.

  • Options to define indents, tabs, and drag-and-drop behavior.

  • Unicode code pages.

  • Emulations of the Emacs and Brief editors.

UE Element List

Code Pane

The area where code or text is displayed for editing. It provides IntelliSense® statement completion for the language in which you are developing. For more information, see Using IntelliSense.

Indicator Margin

A gray column on the left side of the Code Editor where indicators such as breakpoints, bookmarks, and shortcuts are displayed. Clicking this area sets a breakpoint on the corresponding line of code.

Selection Margin

A column between the Indicator Margin and the editing window where you can click to select lines of code. Changes to code are tracked here when you select the Track Changes option in the General, Text Editor, Options Dialog Box.

Horizontal and Vertical Scroll Bars

Allows you to scroll the Code Pane horizontally and vertically so that you can view the code that extends beyond the viewable edges of the Code Pane.

In This Section

Bookmark Window

Allows you to mark and jump to lines in your code.

Code Definition Window

Displays the definition for the symbol selected in the editing window.

Code Snippet Picker

Allows you to insert segments of code stored in your Code Snippets folders.

Code Snippets Manager

Allows you to add and remove folders to be scanned for snippets.

Related Sections

Editing Text, Code, and Markup

Includes sections of topics on configuring and using the Code Editor.

Customizing the Editor

Guidance on using the Text Editor Options dialog boxes.

General, Text Editor, Options Dialog Box

Allows you to set the default indent and tab sizes, drag-and-drop behavior, editor emulation, and whether to display or hide the Editor's margins and scrollbars.

General, All Languages, Text Editor, Options Dialog Box

Allows you to set or reset options across all development languages.

How to: Manage Code Snippets

Describes how to insert ready-made snippets of code, and how to manage folders in which snippets are stored.

Editor Convenience Commands and Features

Techniques for manipulating text and code in the Code Editor.

Finding and Replacing

Guidance on using the Find and Replace window and related search tools.

Setting Bookmarks in Code

Techniques for marking and jumping to particular lines of code.

Coding Aids

Tools for adding and configuring controls, and browsing through object hierarchies.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft