[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

OpenVMS User's Manual


Previous Contents Index

8.5.2 Using the EXIT Command

To save your edited text, use the EXIT command. You can enter the EXIT command by pressing the F10 key or by pressing Ctrl/Z.

If you have modified the current buffer, EVE creates a new version of the file with the same file name and file type as the original version, with the version number incremented by 1. For example, if you use the EXIT command after modifying a file named FUN.DAT;1, the output file is named FUN.DAT;2.

8.5.3 Using the QUIT Command

To end a session without saving your edits, enter the QUIT command. Type YES (Y) and press the Enter key if you want to quit without saving the edits. If you change your mind and decide to save your edits, type N, press the Enter key, and use the EXIT command to exit from the buffer.

If you have modified buffers other than the current one, EVE asks if you want to save the contents of the other buffers. If you type Y, EVE creates a new version of an existing file, incrementing the version number by 1. EVE prompts for a file name if no file currently exists.

If no buffers have been modified, then EXIT and QUIT are the same. For example, if you use EVE to inspect a file without making edits, you can quit by pressing Ctrl/Z.

In the following example, there is a modified buffer named FUN.DAT and the QUIT command is entered:


Command: QUIT
Buffer modifications will not be saved, continue quitting (Y or N)?

8.6 Moving the Cursor

When editing files with EVE, you move the cursor where you want to perform an editing function. The more quickly and efficiently you move the cursor through the text, the more time you save in your editing session. You can use the keyboard or commands to move the cursor.

Table 8-1 shows EVE editing keys that move the cursor. For more information about the GOLD key combinations listed, see the online help topic GOLD.

Table 8-1 EVE Editing Keys That Move the Cursor
Key or Key Sequence Function
Up arrow key Same as MOVE UP. Moves the cursor up one line. On VT100 series terminals, KP5 is also defined as MOVE UP.
Down arrow key Same as MOVE DOWN. Moves the cursor down one line. On VT100 series terminals, KP2 is also defined as MOVE DOWN.
Left arrow key Same as MOVE LEFT. Moves the cursor one character or column to the left. On VT100 series terminals, KP1 is also defined as MOVE LEFT.
Right arrow key Same as MOVE RIGHT. Moves the cursor one character or column to the right. On VT100 series terminals, KP3 is also defined as MOVE RIGHT.
Ctrl/E
or GOLD right arrow key
Same as END OF LINE. Moves the cursor to the end of the current line.
Ctrl/H
or GOLD left arrow key
Same as START OF LINE. Moves the cursor to the beginning of the current line.
GOLD up arrow key Same as TOP. Moves the cursor to the top of the current buffer.
GOLD down arrow key Same as BOTTOM. Moves the cursor to the bottom of the current buffer.
GOLD Next Screen Same as NEXT WINDOW. Moves the cursor to the last position the cursor occupied in the next window on your screen, if you are using two or more windows.
GOLD Prev Screen Same as PREVIOUS WINDOW. Moves the cursor to the last position the cursor occupied in the previous window on your screen, if you are using two or more windows.

Table 8-2 shows EVE commands that move the cursor.

Table 8-2 EVE Commands That Move the Cursor
Command Function
BOTTOM Moves the cursor to the end of the current buffer. By default, EVE defines GOLD down arrow key as BOTTOM.
CHANGE DIRECTION Changes the direction of the current buffer. The direction of the buffer is shown in the status line.
END OF LINE Moves the cursor to the end of the current line. By default, EVE defines both Ctrl/E and GOLD right arrow key as END OF LINE.
FORWARD Default setting. Sets the direction of the current buffer to forward; that is, to the right and down. The direction of the buffer is shown in the status line.
GO TO Moves the cursor to the position you specify, as previously labeled with the MARK command.
LINE Moves the cursor to the beginning of a line (specified by the line number).
MARK Puts an invisible marker at the current position and associates it with the name you specify. Later, you can return to the marked position by using the GO TO command.
MOVE BY LINE In forward direction: moves the cursor to the end of the current line or, if the cursor is already at the end of a line, to the end of the next line. In reverse direction: moves the cursor to the beginning of the current line or, if the cursor is already at the beginning of a line, to the beginning of the previous line. On VT200, VT300, and VT400 series terminals, EVE defines the F12 key as MOVE BY LINE. On VT100 series terminals EVE defines the Minus key on the keypad as MOVE BY LINE.
MOVE BY PAGE Moves the cursor to the next or previous page break (form feed), depending on the current direction. If there is no page break in the current direction, the cursor moves to the bottom or top of the buffer.
MOVE BY WORD In forward direction: moves the cursor to the beginning of the next word or, if the cursor is already at the end of a line, to the beginning of the next line. In reverse direction: moves the cursor to the beginning of the previous word or, if the cursor is already at the beginning of a line, to the end of the previous line.
NEXT SCREEN Scrolls forward in the current buffer by the number of lines in the current window minus one. For example, if the current window is 12 lines long, the NEXT SCREEN command scrolls the cursor forward 11 lines. On VT200, VT300, and VT400 series terminals, EVE defines the E6 key (Next Screen) as NEXT SCREEN. On VT100 series terminals, EVE defines the KP0 key on the keypad as NEXT SCREEN.
NEXT WINDOW or OTHER WINDOW Moves the cursor to the next window on your screen, if there is one. The cursor appears in the last location it occupied in that window. EVE defines GOLD Next Screen as NEXT WINDOW.
PREVIOUS SCREEN Scrolls backward in the current buffer by the number of lines in the current window minus one. For example, if the current window is 12 lines long, the PREVIOUS SCREEN command scrolls the cursor backward 11 lines. On VT200, VT300, and VT400 series terminals, EVE defines the E5 key (Prev Screen) as PREVIOUS SCREEN. On VT100 series terminals, EVE defines the Period key on the keypad as PREVIOUS SCREEN.
PREVIOUS WINDOW Moves the cursor to the previous window on your screen, if there is one. The cursor appears in the last location it occupied in that window. EVE defines GOLD Prev Screen as PREVIOUS WINDOW.
REVERSE Sets the direction of the current buffer to reverse; that is, to the left and up. The direction of the buffer is shown in the status line.
SET CURSOR BOUND Makes the cursor follow the flow of text. The cursor cannot move into an unused portion of the buffer. Similar to cursor behavior in EDT, WPS, and other editors.
SET CURSOR FREE Default setting. You can move the cursor anywhere in the buffer and enter text there.
SET SCROLL MARGINS Sets the top and bottom distances at which scrolling begins automatically as you move the cursor up and down. You specify these distances as numbers of lines or as a percentage of the window size. The default setting is 0; that is, scrolling starts when you move past the top or the bottom of the window.
SHIFT LEFT Shifts the current EVE window to the left by the number of columns you specify. With SHIFT RIGHT and SHIFT LEFT commands, you can view the undisplayed portion of long lines of text without having to change the width of the window or use 132-column mode. The SHIFT LEFT command shifts the window only if you have used the SHIFT RIGHT command.
SHIFT RIGHT Shifts the current EVE window to the right by the number of columns you specify. With SHIFT RIGHT and SHIFT LEFT commands, you can view the undisplayed portion of long lines of text without having to change the width of the window.
START OF LINE Moves the cursor to the beginning of the current line. By default, EVE defines both Ctrl/H and GOLD left arrow key as START OF LINE.
TOP Moves the cursor to the beginning of the current buffer (upper left corner). By default, EVE defines GOLD up arrow key as TOP.

Tutorial: Moving the Cursor in EVE

To move the cursor through a buffer:

  1. Invoke EVE and create the buffer SCHEDULE.DAT with the following command:


    $  EDIT SCHEDULE.DAT
    

    EVE puts the cursor at the top of the buffer and waits for you to enter text.
  2. Enter the following text.


    Schedule for 1 July
    10:00 AM meeting with supervisor
    Read and review memo from Sally
    Work on Pascal program
    

    The [End of file] marker moves down in the buffer as you enter text and the cursor is positioned at the end of the text you inserted.
  3. Enter the TOP command to move the cursor to the beginning of the file.
  4. Press Ctrl/E to move the cursor to the end of the first line of text. Ctrl/E works the same way in EVE as it does in DCL.
  5. Enter the BOTTOM command to move the cursor to the end of the buffer.
  6. Press the up arrow key to move the cursor up one line to the fourth line of text.
  7. Press the Change Direction key to change the current buffer direction to reverse.
  8. Press the Move by Line key to move the cursor to the beginning of the third line of text.
  9. Enter the command LINE 1 to move the cursor to the beginning of the first line of the buffer.
  10. To exit from EVE, press Ctrl/Z.

8.7 Entering Text

You can enter keyboard characters, entire files, and special nonprinting characters (such as control characters) into the buffer that you are currently editing. You can use the keypad or commands to enter text. You can also add text, files, and special characters to the buffer.

8.7.1 Adding Text

You can type characters at the keyboard and add them to the buffer at the current cursor position. The characters you type either supplement or replace existing characters, depending on whether the buffer is in insert or overstrike mode.

8.7.2 Including Files

You can add an entire file by pressing the Do key and entering the EVE command INCLUDE FILE. Type the file specification at the File to include: prompt and press the Enter key. Regardless of the current mode (insert or overstrike) of the buffer, EVE inserts the entire contents of the specified file into the buffer just before the line where the cursor currently appears.

You can use wildcards in the file specification. If there is more than one match for a file specification with a wildcard, EVE displays a list of choices and prompts you to provide a more complete file specification. If the specified file does not exist, EVE displays a message stating that it could not include the file.

8.7.3 Special Nonprinting Characters

You can use the QUOTE command to add special nonprinting characters by pressing Ctrl/V followed by the special character. For example, to insert an escape character into the buffer, press Ctrl/V followed by Ctrl/[. The special character either supplements or replaces existing characters, depending on whether the buffer is in insert or overstrike mode.

8.7.4 EVE Editing Keys for Entering Text

The following table shows the EVE editing keys that you can use to enter text:

Key or Key Sequence Function
Ctrl/A Same as the CHANGE MODE command. Changes the editing mode for the current buffer as shown in the highlighted status line. In insert mode, EVE inserts text at the character position, moving existing text to accommodate the insertion. In overstrike mode, EVE overwrites text at the current position. On VT200, VT300, and VT400 series terminals, EVE defines the F14 key as CHANGE MODE. On VT100 series terminals, EVE defines the Enter key on the keypad as CHANGE MODE.
Ctrl/V Same as the QUOTE command. You can insert nonprinting characters or control codes. To search for special characters, first press the Find key, then press Ctrl/V and the special character to be found. Activate the search by pressing the Enter key.

8.7.5 EVE Commands for Entering Text

The following table shows the commands that you can use to enter text:

Command Function
CHANGE MODE Same as Ctrl/A. Changes the current editing mode as shown in the highlighted status line. In insert mode, EVE inserts text at the current position, moving existing text to accommodate the insertion. In overstrike mode, EVE overwrites text at the current position. On VT200, VT300, and VT400 series terminals, EVE defines the F14 key as CHANGE MODE. On VT100 series terminals, EVE defines the Enter key on the keypad as CHANGE MODE.
INCLUDE FILE Inserts the contents of the specified file into the current buffer at the line above the cursor position. This is useful for combining files.
INSERT MODE Sets the mode of the current buffer to insert, as opposed to overstrike. In insert mode, EVE inserts text at the current position, moving existing text to accommodate the insertion.
OVERSTRIKE MODE Sets the mode of the current buffer to overstrike, as opposed to insert. In overstrike mode, EVE overwrites text at the current position.
QUOTE Same as Ctrl/V. Enters a nonprinting character or a control code that you specify by pressing a key. You can quote a control code or other character when you enter a string for the FIND or REPLACE commands. For example, you can quote the Tab key to search for tab characters.

8.7.6 Setting Buffer Mode

Before you begin typing text, check whether your buffer is in insert mode or overstrike mode.

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.

Tutorial: Adding Text in Insert or Overstrike Mode

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.8 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.

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

Table 8-3 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.9.
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.

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

Table 8-4 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.9.
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.12.
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).

Tutorial: Erasing and Restoring Text

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.9 describes the functions of the SELECT and REMOVE commands, which can be used together to erase text from a buffer.


Previous Next Contents Index