Changing and Selecting Text
Whether you are editing code, HTML, or plain text, the Microsoft Script Editor works the same and functions like other text editors or word processors.
To add or insert text
- Either click somewhere in the document or move the cursor to the desired location.
- Type 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 on the Script Editor taskbar. 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 or immediately after the word or letter you want to delete.
- Press the DELETE or BACKSPACE key, as appropriate, as many times as needed to delete the characters or words. In Design view, press CTRL+DELETE and CTRL+BACKSPACE to delete whole words.
Alternatively, 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 HOME, END, PAGEUP, or PAGEDOWN key, or with one of the arrow keys. You can click in the Selection Margin to select the current line.
- 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 Script 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 Script Editor window).
- Column (Box) Mode Rectangular boxes of code are selected. When you press ALT, left-click the mouse and 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.
- Alternatively, 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.
- Alternatively, use the SHIFT+ALT+Arrow keys.
For information about moving around in a document, see Navigating Text.