|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Changing and Selecting Text
Whether you are editing code, HTML, or plain text, the Code Editor works the same and functions like other text editors or word processors. For code that is part of a project, the project's programming language support provides automatic statement completion, syntax checking, keyword colorization, and other services. For information about moving around in a document, see Navigating Code and Text.
To add or insert text
- Either click somewhere in the document or move the cursor to the desired location.
- Enter the text.
If your cursor is between existing characters, the text is inserted between them.
To overwrite characters in an existing line, press the INSERT key to put the editor in Overstrike mode. You can tell that it is in that mode when the cursor turns from a flashing line into a flashing block, and by the OVR displayed in the bottom right corner of the integrated development environment. Press the INSERT key again to return to Insertion (INS) mode.
To delete characters or a word in a line
- Place the cursor immediately before the word or letter you want to delete.
- Press the DELETE key as many times as needed to delete the characters or words.
CTRL+DELETE and CTRL+BACKSPACE delete whole words. CTRL+I deletes the current line.
Place your cursor at the end of the letter or word and press the BACKSPACE key.
Note You can double-click a word and then press DELETE or BACKSPACE to delete it.
To delete lines, paragraphs, and pages
- Highlight the text you want to delete by holding down the left mouse button and dragging over the text, or by using the SHIFT key with the either the Arrow or the HOME/END/PAGEUP/PAGEDOWN keys.
- In some languages, double-clicking in the Selection Margin selects the current definition or paragraph (HTML).
- Press DELETE or BACKSPACE.
You can also cut, copy, and drag and drop text in your document. For more information, see Dragging and Dropping Text.
You can format your code or let the environment do it for you. For more information, see Managing Code Formatting.
The Code Editor has two text selection modes:
- Stream Mode The selection acts similarly to the standard Microsoft Windows multi-line edit control. Selection is a one-dimensional stream from the start of the file to the end. Entire lines are selected when you move to the next or a previous line. To select an entire line, click the Selection Margin (on the far left of the Editor window).
- Column (Box) Mode Rectangular boxes of code are selected. When you press ALT and left-click the mouse, and then drag it over text, only the rectangular portion of text you highlight is selected instead of the whole line. The selection includes any character that intersects with the rectangle defined by the beginning character (anchor character) and the last character in the selection. If the selection width is zero, then whole lines are selected.
To stream select text
- Left-click and drag the mouse over the text.
- Use the SHIFT+Arrow keys.
To column select text
- Hold down the ALT key, and then left-click the mouse and drag it over the text.
- Use the SHIFT+ALT+Arrow keys.