[Digital logo]
[HR]

OpenVMS User's Manual


Previous | Contents

To determine the mode your buffer is in, look at the highlighted status line. If the buffer is in insert mode, text is inserted at the cursor position and text that already appears in the buffer moves to accommodate your insertions. If the buffer is in overstrike mode, text that you type at the keyboard is inserted at the cursor position and the text that already appears in the buffer is overwritten as the cursor moves through it.

To change from one mode to another, press Ctrl/A.

8.8.7 Tutorial: Adding Text

Use the following tutorial to add text to a file in both insert mode and overstrike mode:

  1. Invoke EVE to edit the existing file SCHEDULE.DAT.
  2. Check the highlighted status line to ensure that EVE is in insert mode.
  3. If EVE is in overstrike mode, press Ctrl/A to change to insert mode.
  4. Move the cursor to the first letter s in the word supervisor, type Engineering, and press the space bar.
    The word Engineering is inserted in your text buffer, and the rest of the text on the line moves to the right.
    Schedule for 1 July 
    10:00 AM meeting with Engineering supervisor 
    Read and review memo from Sally 
    Work on Pascal program 
    [End of file] 
     
    Buffer: SCHEDULE.DAT                   | Write | Insert | Forward 
    
  5. Press Ctrl/A to change to overstrike mode.
  6. Move the cursor to the letter S in the word Sally and type Peggy.
    The word Peggy is placed in the buffer, overwriting the word Sally.
    Schedule for 1 July 
    10:00 AM meeting with Engineering supervisor 
    Read and review memo from Peggy 
    Work on Pascal program 
    [End of file] 
     
     
    Buffer: SCHEDULE.DAT               | Write | Overstrike | Forward 
    
  7. To exit from EVE, press Ctrl/Z.

8.9 Erasing and Restoring Text

With EVE, you can easily erase text or correct mistakes made during an editing session. If you erase text by mistake, you can restore the most recently erased text to its former location or, by moving the cursor, to another location.

To erase text from your buffer, move the cursor to the text you want to erase and press the appropriate editing key or enter the appropriate EVE command.

8.9.1 EVE Editing Keys for Erasing and Restoring Text

Table 8-2 shows EVE editing keys that erase and restore text.

Table 8-2 EVE Editing Keys for Erasing and Restoring Text
Key or Key Sequence Function
Delete key or Delete Erases the character to the left of the cursor. Same as the DELETE command. If pending delete is enabled, DELETE erases text in the select range and puts it into the Restore Selection buffer. For more information about using pending delete, see Section 8.10.
Ctrl/J Same as ERASE WORD. Erases the current word or, if the cursor is between words, erases the next word. On VT200, VT300, and VT400 series terminals, EVE defines the F13 key as ERASE WORD. On VT100 series terminals, EVE defines the Comma key on the keypad as ERASE WORD.
Ctrl/U Same as ERASE START OF LINE. Erases characters left of the cursor to the start of the line.
GOLD Insert Here Same as RESTORE. Reinserts, at the current position, the word, line, or sentence that you just erased with an EVE command or editing key.
GOLD F13 Same as RESTORE WORD (except with the WPS keypad). Reinserts, at the current position, the word that you last erased.

8.9.2 EVE Commands for Erasing and Restoring Text

Table 8-3 shows EVE commands that erase and restore text.

Table 8-3 EVE Commands for Erasing and Restoring Text
Command Function
DELETE Erases the character to the left of the cursor. In insert mode, EVE moves existing text to accommodate the deleted character. In overstrike mode, EVE replaces the character with a space. At the start of a line, DELETE erases the carriage return for the previous line (regardless of mode) and the current line moves up. If pending delete is enabled, DELETE erases text in the select range and puts it into the Restore Selection buffer. For more information about using pending delete, see Section 8.10.
ERASE CHARACTER Erases the character the cursor is on. In insert mode, EVE moves existing text to accommodate the deleted character. In overstrike mode, EVE replaces the character with a space. If the cursor is at the end of the line, the carriage return is erased---regardless of the mode---and the next line moves up.
ERASE LINE Erases from the current character to the end of the line, appending the next line to the end of the current line. If the cursor is at the end of the line, only the carriage return is erased and the next line moves up.
ERASE PREVIOUS WORD Erases the previous word or the word the cursor is on. If the cursor is between words or on the first character of a word, the previous word is erased. If the cursor is in the middle of a word, all of that word is erased (same as ERASE WORD). If the cursor is at the start of a line, the carriage return at the end of the previous line is erased and the current line moves up.
ERASE START OF LINE Erases the current line of text, starting with the character left of the cursor until the start of the line. If you are already at the start of a line, nothing is erased.
ERASE WORD Erases the current word or, if the cursor is between words, erases the next word. Same as Ctrl/J. On VT200, VT300, and VT400 series terminals, EVE defines the F13 key as ERASE WORD. On VT100 series terminals, EVE defines the Comma key on the keypad as ERASE WORD. If the cursor is at the end of the line, only the carriage return is erased and the next line moves up.
RESTORE Reinserts, at the current position, the word, line, or sentence that you last erased with an EVE command or editing key. RESTORE does not restore single characters. EVE defines GOLD Insert Here as RESTORE.
RESTORE CHARACTER Reinserts, at the current position, the character you last erased with an EVE command or editing key. In overstrike mode, the restored character replaces the character the cursor is on. In insert mode, the restored character is inserted at the cursor position and existing text moves to accommodate it.
RESTORE LINE Reinserts, at the current position, the line that you last erased with an EVE command or editing key.
RESTORE SELECTION Reinserts, at the current position, the text last erased with a pending delete operation. For more information about using pending delete, see Section 8.13.
RESTORE WORD Reinserts, at the current position, the word that you last erased with an EVE command or editing key. EVE defines GOLD F13 as RESTORE WORD (except with the WPS keypad).

8.9.3 Tutorial: Erasing and Restoring Text

Use the following tutorial to erase and restore text:

  1. Invoke EVE to create the buffer RHYMES.DAT and enter the following text:
    She rhymes with tree, 
    also with bee, 
    and this one makes three.
    
  2. Move the cursor to the letter l in the word also. Enter the ERASE LINE command.
    EVE erases all characters from the letter l in also to the end of the line and appends the next line to the current line.
    She rhymes with tree, 
    aand this one makes three. 
    
  3. Move the cursor to the letter y in the word rhymes. Enter the ERASE WORD command.
    EVE erases the word rhymes and shifts the remaining text to the left.
    She with tree, 
    aand this one makes three. 
    
  4. Move the cursor to the second letter a on the second line. Enter the RESTORE LINE command.
    EVE restores the last line that was erased, in this case, lso with bee,.
    She with tree, 
    also with bee, 
    and this one makes three.
    
  5. Move the cursor to the letter w in the word with on the first line. Enter the RESTORE WORD command.
    EVE restores the last word that was erased, in this case, rhymes.
    She rhymes with tree, 
    also with bee, 
    and this one makes three. 
    
  6. To exit from EVE, press Ctrl/Z.

Section 8.10 describes the functions of the SELECT and REMOVE commands, which can be used together to erase text from a buffer.

8.10 Moving Text

You can use EVE commands to select sections of text for copying, moving, deleting, or other editing operations. This section discusses how to move text.

For information on how to move text from one buffer to another, see Section 8.19.

You can also select a rectangular area (a box) of text rather than a linear range of text to move, erase, or duplicate text. For information about using box editing commands, see Section 8.12.

8.10.1 How to Move Text

To move text, follow these steps:
Step Task
1 Once you have invoked a file in EVE, place the cursor on the first character you want to move.
2 Press the Select key.
3 Move the cursor to one character beyond the last character you want to move. (In reverse direction, move the cursor to the last character, not one beyond.) The text to be moved is highlighted in reverse video. (If you decide not to remove text from the buffer, press the Select key again to cancel the selection.)
4 Press the Remove key. EVE deletes the highlighted text from your screen and places it in the Insert Here buffer.
5 Press the Insert Here key to insert text.

EVE inserts the text at the cursor location. You can insert the text contained in the Insert Here buffer any number of times at any cursor location until you select a new section of text and put that new text in the Insert Here buffer. The Insert Here buffer contains whatever text was last copied or removed.

8.10.2 EVE Editing Keys That Move Text

The following table describes EVE editing keys used to move text:
Key or Key Sequence Function
Insert Here Same as the INSERT HERE or PASTE command. Inserts, at the current position, text that you removed or copied.
Remove Same as the REMOVE or CUT command. Removes the text that is marked with SELECT or highlighted by FIND and places it in the Insert Here buffer.
Select Marks text (highlighting it in reverse video) from the initial cursor location to wherever you move the cursor. The text that is highlighted is called the select range. To cancel the selection, press the Select key again or use RESET.
GOLD Select Same as RESET. Cancels any of the following and resets the direction of the buffer to forward:
  • Highlighting of a select or found range
  • A press of the GOLD key (or GOLD n combination for a repeat count)
  • An incomplete or recalled command line, or Choices buffer display
  • The output of SHOW, SHOW DEFAULTS BUFFER, SHOW SUMMARY, or SHOW WILDCARDS, thereby returning you to the buffer you were working in
GOLD Remove Same as the STORE TEXT or COPY command. Copies text that is marked with SELECT or FIND, putting it in the Insert Here buffer. Text that is copied is not removed from its original position.

8.10.3 EVE Commands That Move Text

The following table describes EVE commands used to move text:
Command Function
INSERT HERE
or PASTE
Inserts the text you copied or removed. By default, EVE defines the E2 key (Insert Here on the minikeypad on VT200, VT300, and VT400 series terminals) and the KP9 key (on VT100 series terminals) as INSERT HERE.
REMOVE
or CUT
Removes the text that was marked with SELECT or highlighted by FIND, and places it in the Insert Here buffer. By default, EVE defines the E3 key (Remove on the minikeypad on VT200, VT300, and VT400 series terminals) and the KP8 key (on VT100 series terminals) as REMOVE.
RESET Cancels any of the following and resets the direction of the buffer to forward:
  • Highlighting of a select or found range
  • A press of the GOLD key (or GOLD n combination for a repeat count)
  • An incomplete or recalled command line, or Choices buffer display
  • The output of SHOW, SHOW DEFAULTS BUFFER, SHOW SUMMARY, or SHOW WILDCARDS, thereby returning you to the buffer you were working in
RESTORE SELECTION Reinserts the text erased by a pending delete operation. For more information about using pending delete, see Section 8.13.
SELECT Highlights text in reverse video from the initial cursor location to wherever you move the cursor. The text that is highlighted is called the select range. To cancel the selection, enter the SELECT command again or use RESET. By default, EVE defines the E4 key (Select on the minikeypad on VT200, VT300, and VT400 series terminals) and the KP7 key (on VT100 series terminals) as SELECT.
SELECT ALL Highlights all text in reverse video in the current buffer regardless of the cursor position. The text that is highlighted is called the select range. To cancel the selection, enter the SELECT command or use RESET. The SELECT ALL command temporarily disables pending delete to avoid accidentally erasing all of the buffer.
SET NOPENDING DELETE Default setting. Disables deletion of selected text when you use the Delete key or type new text. If you select text in the buffer, typing new text adds characters to the select range and using the Delete key erases only the character to the left of the cursor.
SET PENDING DELETE Enables pending delete, which lets you quickly erase blocks of text. First enable pending delete, then use the SELECT command to choose the text you want to erase. Erase the text by pressing the Delete key (or any other key on the alpha-numeric keypad). To reinsert what you deleted, move the cursor to where you want the text and enter the RESTORE SELECTION command. The default is SET NOPENDING DELETE.
STORE TEXT
or COPY
Copies text that was marked with SELECT or FIND, placing it in the Insert Here buffer. Text that is copied is not removed from its original position.

8.10.4 Tutorial: Moving Text

Use the following tutorial to select, remove, and insert text from one location to another:

  1. Invoke EVE to edit the file RHYMES.DAT.
  2. Move the cursor to the beginning of the second line of RHYMES.DAT and press the Select key.
  3. Press the down arrow key once.
    The second line of text is highlighted.
  4. Press the Remove key.
    The second line of text is removed from the current buffer.
    She rhymes with tree, 
    and this one makes three. 
    [End of file] 
    
  5. Press the Return key twice and then press the Insert Here key.
    The text in the Insert Here buffer is inserted at the current cursor location.
    She rhymes with tree, 
     
     
    also with bee, 
    and this one makes three. 
    [End of file] 
    
  6. To exit from EVE, press Ctrl/Z.

8.11 Copying Text

With the COPY command, you can copy text elsewhere. The STORE TEXT command is the same as the COPY command. You can substitute the STORE TEXT command wherever the COPY command is used in the following example.

8.11.1 Tutorial: Copying Text

Use this tutorial to copy text when the buffer is set in a forward direction:

  1. Invoke EVE to edit the file RHYMES.DAT.
  2. Move the cursor to the first line of text.
  3. Press the Select key.
  4. Press Ctrl/E to move the cursor to the end of the first line.
  5. Enter the COPY command. The Insert Here buffer now contains a copy of the selected text.
  6. Move the cursor to the line above also with bee,.
  7. Press the Insert Here key. Your buffer should now look as follows:
    She rhymes with tree, 
     
    She rhymes with tree, 
    also with bee, 
    and this one makes three. 
    [End of file] 
    
  8. Move the cursor to the beginning of the first line of text. Use the Select key and then the Remove key to delete the first line of text.
  9. To exit from EVE, press Ctrl/Z.

8.12 Box Editing

You can edit text that has rectangular areas, or boxes, as well as standard linear ranges. For example, you can select a box containing a list or columns in a table, and then cut and paste the box or perform some other editing operation on the box.

8.12.1 Selecting a Box of Text

To select a box of text, follow these steps:

  1. Put the cursor where you want to start the selection---typically, where you want the upper left corner of the box.
  2. Enter the BOX SELECT command.
  3. Move the cursor to where you want the diagonally opposite corner of the box---typically, moving from upper left to lower right.

As you move the cursor, text that you cross is highlighted in bold video (a regular selection uses reverse video). The box is defined by diagonally opposite corners. If you move from upper left to lower right, the character that the cursor is on is outside the box, that is, the lower right corner of the box is left of the cursor.

You can then edit the box by using any of the editing commands that ordinarily work on a linear or a rectangular range. You need not redefine keys. See the Extensible Versatile Editor Reference Manual for further information.

You can use FIND SELECTED if the selection does not cross lines or OPEN SELECTED. You can also use pending delete.

If you are going to make several box edits---for example, in editing multicolumn tables and lists---use the SET BOX SELECT command. SET BOX SELECT redefines several commands and keys as the corresponding BOX commands and makes other editing operations work on boxes instead of linear ranges.

To cancel a box selection, repeat SELECT or BOX SELECT, or use RESET.

8.12.2 Cutting and Pasting a Box of Text

Cutting a box usually pads the area with spaces to keep the column alignment of text to the right of the box. Pasting a box usually overwrites existing text. Tab characters in the box, or that overlap the box, are converted to spaces to keep the column alignment of text.

8.12.3 EVE Commands for Box Editing

The following table lists the EVE commands for box editing:
Command Function
BOX COPY Copies a box of text without removing it, so you can paste it elsewhere.
BOX CUT Cuts a box of text so you can paste it elsewhere, usually padding the area with spaces to keep the column alignment of text to the right of the box.
BOX CUT INSERT Cuts a box, making text to the right of the box "collapse" to the left, closing the gap.
BOX CUT OVERSTRIKE Cuts a box, padding the area with spaces to keep the column alignment of text to the right of the box.
BOX PASTE Pastes a box of text you copied or cut, usually overwriting existing text.
BOX PASTE INSERT Pastes a box, pushing existing text to the right.
BOX PASTE OVERSTRIKE Pastes a box, overwriting existing text.
BOX SELECT Selects a box of text. Typically, you start at the upper left corner of the box and move the cursor to where you want the lower right corner.
RESTORE BOX SELECTION Puts back (undeletes) a box erased with pending delete, usually overwriting existing text.
SET BOX NOPAD Disables padding and overstriking for box editing unless the buffer is in overstrike mode.
SET BOX NOSELECT Default setting. Disables box selection, cutting, and pasting. Commands such as SELECT, COPY, and REMOVE use standard linear ranges. To edit boxes, use BOX commands.
SET BOX PAD Default setting. Enables automatic padding and overstriking for box editing, regardless of the buffer mode.
SET BOX SELECT Enables box selection, making commands such as SELECT, REMOVE, and INSERT HERE the same as the corresponding BOX commands, without having to redefine keys.

8.12.4 Tutorial: Cutting and Pasting Text

Use this tutorial to select and then cut and paste a box of text:

  1. Invoke EVE to create the buffer CITIES.DAT and enter the following text:
          Rome    Paris   New York 
          London  Tunis   Boston 
          Tokyo   Bonn    Lisbon
    
  2. Move the cursor to the left of the letter P in the word Paris. Enter the BOX SELECT command.
  3. Move the cursor two spaces to the right of the second letter n in the word Bonn---the diagonally opposite corner of the box. The text that you cross is highlighted in bold video. Enter the BOX CUT command.
    EVE removes the box of text.
  4. Move the cursor to the right of the column that begins with the words New York.
  5. Enter the BOX PASTE command.
    EVE pastes the box of text into a new column, as follows:
        Rome        New York     Paris 
        London      Boston       Tunis 
        Tokyo       Lisbon       Bonn 
    [End of file] 
    

8.12.5 SET BOX SELECT Commands

The following lists the SET BOX SELECT commands:
Command Effect with SET BOX SELECT
INSERT HERE or PASTE BOX PASTE
REMOVE or CUT BOX CUT
RESTORE SELECTION RESTORE BOX SELECTION
SELECT BOX SELECT
STORE TEXT or COPY BOX COPY

You can then select, cut, and paste a box by using the Select, Remove, and Insert Here keys, without having to redefine the keys.

8.13 Using Pending Delete

You can use pending delete to erase selected text. Pending delete refers to erasing a selection by typing new text, pressing the space bar, or by using delete (typically, pressing the Delete key).

With a box selection, pending delete works like BOX CUT, usually padding the area with spaces to keep the column alignment of text to the right of the box.

Pending delete gives you an alternative way of cutting and pasting text because pending delete does not use the Insert Here buffer. For more information about pending delete, see the EVE online help topic called Pending Delete.

8.13.1 Erasing a Selection with Pending Delete

To erase a selection using pending delete, follow these steps:

  1. Invoke a file in EVE.
  2. To enable pending delete, use the SET PENDING DELETE command. The default setting is SET NOPENDING DELETE.
  3. Select the text you want to erase. You can use SELECT or BOX SELECT. (You cannot use SELECT ALL.)
  4. Type new text or use the DELETE command.

8.13.2 Restoring a Selection That Was Erased with Pending Delete

To put back (restore) the text you erased with pending delete, follow these steps:

  1. Put the cursor where you want to restore the text. If restoring a box selection, put the cursor where you want the upper left corner of the box to be.
  2. Use RESTORE SELECTION. If a box selection was erased with pending delete, use RESTORE BOX SELECTION. If you used SET BOX SELECT, you can use RESTORE SELECTION (without having to redefine a key).

8.13.3 Effects on Box Editing

Restoring a box works like BOX PASTE, usually overwriting existing text. When using the SET BOX NOPAD command, the effects of box editing depend on the mode that the buffer is in (insert or overstrike, as shown in the status line):


Previous | Next | Contents | [Home] | [Comments] | [Ordering info] | [Help]

[HR]

  6489P011.HTM
  OSSG Documentation
  22-NOV-1996 13:16:49.18

Copyright © Digital Equipment Corporation 1996. All Rights Reserved.

Legal