[OpenVMS documentation]
[Site home] [Send comments] [Help with this site] [How to order documentation] [OpenVMS site] [Compaq site]
Updated: 11 December 1998

OpenVMS User's Manual


Previous Contents Index


Chapter 8
Editing Text Files: Using EVE

The Extensible Versatile Editor (EVE) is a general-purpose text editor based on the DEC Text Processing Utility (DECTPU). This chapter includes information about:

For additional information about EVE, refer to the following:

Conventions

In this chapter, EVE key names are shown (with the SHOW KEY or HELP KEYS command) by using a slash for control keys, shifted function keys, and Alt key combinations, and a space or a dash for GOLD key sequences. Thus, key combinations that require you to hold down one key (such as Ctrl) while pressing another key are shown with a slash; key combinations in which you press one key after another (such as GOLD-Help) are shown with a space or a dash.

8.1 EVE Features

DECTPU is a high-performance, programmable text processor. With EVE software, you can create and edit text files such as business letters, technical documents, and program source files.

EVE is the default editor on the OpenVMS operating system. Unless you define a different default editor, EVE is invoked when you enter the EDIT command.

You can use EVE on a character-cell terminal (VT100, VT200, VT300, or VT400 series) or on a workstation with the OpenVMS DECwindows Motif user interface.

With EVE, you can do the following:

Once you know how to invoke EVE and how to enter commands, you can use EVE commands to create and edit files. Using editing keys and commands, you can move the cursor, set buffer mode, and perform editing operations such as entering, erasing, restoring, and moving text.

8.2 Getting Help

You can get online help at any time during your editing session. There are two kinds of online help available with the EVE editor:

8.2.1 Using Keypad Help

To access keypad help, follow these steps:

  1. Press the Help key.
    The Help utility displays a diagram of your keypad.
  2. Follow the directions on the screen to get information on:
  3. Press the Return key to exit from Help.

8.2.2 Using EVE Help

To use the HELP command to access EVE Help, follow these steps:

  1. Press the Do key.
  2. Enter the command HELP.
    Use the Prev Screen and Next Screen keys to scroll through the list of available help topics.
  3. Press the Return key to exit from Help.

To get information about a particular command, enter HELP followed by the command name and press the Return key. The help text appears on the screen. You can also get help on DECTPU built-in procedures by entering the command HELP TPU.

The following example shows the help text for the MOVE BY LINE command:


MOVE BY LINE 
 
Moves the cursor a line at a time in the current direction. 
 
Keys:  EVE Default                        VT100 Keypad 
       ------------------------------------------------- 
       F12                                MINUS on keypad 
 
Steps: 
 
   1.  If necessary, set the direction to move in --- forward or reverse. 
 
   2.  Use MOVE BY LINE (see key list above). 
 
 
Usage notes: 
 
o  In forward direction, moves to the end of the current line, or to the 
   end of the next line, if any. 
 
o  In reverse direction, moves to the start of the current line, or to 
   the start of the next line, if any. 
 
Related topics: 
 
   CHANGE DIRECTION      END OF LINE      LINE      START OF LINE 

8.3 Beginning an Editing Session

To invoke EVE, use the EDIT/TPU command. When you begin an editing session, you can specify the name of an existing file or a new file you want to create. If you do not specify a file name now, EVE prompts you for a file name when you end your editing session if you have added text to the default buffer called Main.

The following example invokes EVE to create a new file named NEWFILE.DAT:


$ EDIT/TPU NEWFILE.DAT


[End of file](1)
 
 
 
                               (2)
 
 
 
 
Buffer: NEWFILE.DAT              | Write | Insert | Forward (3)
Command: (4)
Editing new file. Could not find: FABLES.TXT (5)

As you examine the EVE screen display, note the following:

  1. The end-of-file marker marks the end of an EVE buffer. It is visible only on the screen and does not become part of your file. When you add text to the buffer, the end-of-file marker moves down. Depending on the length of your terminal screen, the marker may not be visible when you view the beginning of a buffer that contains many lines of text.
  2. A window is an area of your screen that displays a buffer. EVE buffers exist only during the editing session. When you end an editing session, you can save your edits or discard them.
  3. A highlighted status line appears at the bottom of the EVE window and provides information about the buffer you are viewing in the window. The status line shows the buffer name, editing status (write or read-only), current mode (insert or overstrike), and current direction (forward or reverse).
  4. You use the command line to enter line-mode commands (see Section 8.4). You get the command line by pressing the Do key.
  5. The message window contains an informational message that appears beneath the highlighted status line when you invoke EVE and specify a file name on the command line. The message states either that the file is a new file or that a certain number of lines were read from an existing file. During the editing session, EVE displays other messages in the message window.

8.4 Entering Commands

There are two ways to enter EVE commands:

8.4.1 Typing Commands

To type a command, follow these steps:

  1. Press the Do key.
    The cursor moves to the command window and EVE prompts you to type a command.
  2. Type a command. You can abbreviate the command by using the first few letters of the command. EVE is not case sensitive. You can use any combination of uppercase and lowercase characters in the command line except when specifying strings for the FIND and REPLACE commands.
  3. Press the Do key or the Return key.
    EVE executes the command or prompts you for further information.

8.4.2 Using Defined Keys

You can use defined keys to enter EVE commands. Each defined key performs one editing command. You can also define your own keys to perform EVE functions (see Section A.1).

EVE defines some keys by default. The predefined keys on VT200, VT300, and VT400 series terminals include:

Control keys, arrow keys, and the Tab, Return, and Delete keys have the same definitions on all three types of terminal.

Figure 8-1 shows the predefined keys for the VT200, VT300, and VT400 series terminal.

Figure 8-1 EVE Keys --- VT200, VT300, and VT400 Series Terminals


On VT100 series terminals, EVE automatically defines most of the numeric keypad keys, the four arrow keys, and certain control keys. Figure 8-2 shows the predefined keys for the VT100 series terminal.

Figure 8-2 EVE Keys --- VT100 Series Terminals


8.5 Saving Your Edits and Exiting from EVE

You can use one of the following methods to save your edits:

8.5.1 Using the WRITE FILE Command

To save the text in your buffer by writing it to a file without exiting from EVE, use the WRITE FILE command. If no file is associated with your buffer, EVE prompts for a file name, as follows:


Type filename for buffer Main (press RETURN to not write it): 

Type the name of the file and press the Return key to write out the buffer to a file.

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 (on VT200, VT300, or VT400 series terminals) 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 Return 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 Return 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/TPU 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.


Previous Next Contents Index

[Site home] [Send comments] [Help with this site] [How to order documentation] [OpenVMS site] [Compaq site]
[OpenVMS documentation]

Copyright © Compaq Computer Corporation 1998. All rights reserved.

Legal
6489PRO_014.HTML