This documentation is archived and is not being maintained.

Editing Code, HTML, and Text

Visual Studio .NET 2003

To edit either code or text, use the Visual Studio .NET Code Editor, also known as the Text Editor. In either case, you are entering text, but in the Code Editor, the editing experience is supported by a language-specific service, such as Visual Basic or Visual C++. This service checks for syntax and usage errors. When you enter text without a project, or when you create or edit a text document, the window may act as a plain text editor. The Code Editor is the basis for other Visual Studio text-editing tools, such as the HTML Editor's Source view. However, some programming languages support colorization and other helpful features even when you are editing a file of code in that language outside of a Visual Studio project.

The Code Editor has several features to simplify the process of writing and editing code. The exact features that are available vary, depending on your programming language and the options set for the Code Editor in the Options dialog of the Tools menu.

There are three ways to open the Code Editor:

  • Solution Explorer, by selecting a form or module and choosing the View Code button, or by double-clicking the form or module.
  • A form, by right-clicking a control or form and choosing View Code, or by choosing Code in the View menu.
  • The File menu, by choosing the Open File or New File command.
Caution   If you share files with users at other sites that use distinct code pages, you should save your file with the appropriate Unicode code page to prevent errors when reading the file. For information about how to do this, see Managing File Storage.

Also, when saving files for Unix or Macintosh, be sure to save your files with the appropriate document format. To do this, choose Save As on the File menu, Save With Encoding from the Save button, and then choose Unix or Macintosh under Line Endings.

To learn more about See
Code Editor convenience commands and features Editor Convenience Commands and Features
Adding, removing, selecting, and changing text Changing and Selecting Text
Navigating through text Navigating Code and Text
Dragging and dropping text Dragging and Dropping Text
Managing the format of your code, such as indenting and word wrap Managing Code Formatting
Finding text using incremental search Searching an Active Document Incrementally
Altering the Code Editor's view Managing the Code Editor and View
Hiding code and viewing it as an outline Outlining and Hiding Code
Customizing the Code Editor's features and options, such as fonts and shortcuts Customizing the Editor's Features and Options
Changing the font color, size, and style in the Code Editor Changing Font Color, Size, and Style
Issues with printing code and text Code and Text Printing Issues
Adding tasks to the Task List in the Code Editor Adding Comment Tasks to the Task List
Using macros to simplify code writing in the Code Editor Using Macros in the Editor
Debugging code in the Code Editor Debugging Code in the Editor
Deleting and restoring text with the Clipboard ring Using the Clipboard Ring
Checking out, opening, and closing files in the Code Editor, as well as Unicode issues. Managing File Storage
Explains how to create and edit HTML documents with the HTML Designer.
Editing HTML

See Also

Code and Text Editor | Editing HTML | Editor Convenience Commands and Features