Document revision date: 30 March 2001

## OpenVMS User's Manual

Previous | Contents | Index

#### A.1.8.3 Defining GOLD Keys in Initialization Files

Use the following format to define a GOLD key in an initialization file:

`SET GOLD KEY keyname`

For example, the following command defines the PF1 key as the GOLD key:

    SET GOLD KEY PF1

## A.2 Learn Sequences

The LEARN command assigns a sequence of keystrokes, called a learn sequence, to a single key or control key sequence. With learn sequences, you can enter the same series of keystrokes in a buffer any number of times by pressing one key. All learn sequences are discarded when you terminate an EVE editing session unless you use the SAVE ATTRIBUTES command or the SAVE EXTENDED EVE command to save them from one editing session to the next.

To define a learn sequence, take these steps:

Step | Task
--- | ---
1 | Enter the LEARN command.
2 | Type the keystrokes to be remembered. You can press keys already defined, type text, or both.
3 | Press Ctrl/R.
4 | At the prompt, press the key to be associated with the learn sequence, such as F17 or PF3.
5 | To cancel the learn sequence, press the Return key or Ctrl/M.

The message "Key sequence remembered" appears if you have successfully defined a key.

To define a learn sequence that inserts a string of text into your file when you press Ctrl/F, follow these steps:

Step | Task
--- | ---
1 | Invoke EVE to edit the file RHYMES.DAT.
    She rhymes with tree,

    also with bee,

    and this one makes three.

    [End of file]

    Buffer: RHYMES.DAT | Write | Insert | Forward

    3 lines read from file WORKDISK:[USER]RHYMES.DAT
2 | Move the cursor to the end of the buffer. To begin the definition of the learn sequence, press the Do key, and enter the LEARN command.
3 | Insert the following text, which EVE is to remember, at the end of your file:
    And what is a rhyme?
4 | Press Ctrl/R.
5 | Press Ctrl/F, the key to which you are assigning the learn sequence.

For the rest of the editing session, when you press Ctrl/F, EVE inserts the text "And what is a rhyme?" wherever the cursor is positioned at the time.

## A.3 Setting and Saving Attributes

You can save most global attributes in a section file or DECTPU command file for future editing sessions. You can also set a default section file or command file to be created or updated for saving attributes.

### A.3.1 EVE Default Settings

This list shows the EVE default settings---the settings EVE uses unless you specify otherwise. You may want to refer to this list to check which settings you want to change when creating an initialization file. Some settings are global (applying to all buffers you edit), and others are buffer specific. For example, the type of cursor motion (bound or free) and tab mode (insert, spaces, or movement) are the same for all buffers you edit, whereas you can set margins, paragraph indents, and tab stops differently for each buffer.

- SET BOX NOSELECT
  Disables box-style selecting, cutting, and pasting so you can select and edit standard linear ranges.
- SET BOX PAD
  Enables padding and overstriking for box editing, regardless of the mode of the buffer.
- SET CURSOR FREE
  You can move the cursor anywhere in the buffer and enter text there, as opposed to a bound cursor, which cannot move into the unused portion of the buffer. Using SET KEYPAD WPS automatically enables a bound cursor.
- SET EXIT ATTRIBUTE CHECK
  If you changed attributes, then when you exit or quit, EVE asks whether you want to save them.
- SET FIND CASE NOEXACT
  EVE finds any occurrence of a text string if you enter the search string in all lowercase.
- SET FIND NOWHITESPACE
  FIND and WILDCARD FIND commands match spaces and tabs in the search string exactly as entered and do not search across a line break.
- SET FUNCTION KEYS NODECWINDOWS
  Keeps the normal key definitions (EVE default, EDT keypad, or WPS keypad) rather than defining some keys for DECwindows functions.
- SET KEYPAD NUMERIC
  or
  SET KEYPAD VT100
  On VT200, VT300, and VT400 series terminals, keys on the numeric keypad are undefined, except for the PF4 and Enter keys. On VT100 series terminals, the numeric keypad is used for the EVE default key bindings. Control keys are defined the same on either type of terminal. Also, you can set the EDT keypad or WPS keypad on either type of terminal.
- SET NOCLIPBOARD
  Copy, cut, and paste operations use the Insert Here buffer in EVE. On DECwindows, you can enable the clipboard, which lets you transfer text between EVE and other DECwindows applications. WPS keypad keys do not use the clipboard, regardless of the setting.
- SET NODEFAULT COMMAND FILE
  EVE uses one of the following as the default command file for saving attributes:
  - Command file specified with the /COMMAND= qualifier when you invoked EVE
  - Command file named TPU$COMMAND.TPU in the current directory
  - Command file defined by the logical name TPU$COMMAND
- SET NODEFAULT SECTION FILE
  If section file prompting is enabled (the default), EVE prompts whether to save attributes in a section file. If section file prompting is disabled, EVE prompts whether to save attributes in a command file.
- SET NOGOLD KEY
  EVE does not have a default GOLD key. Setting the EDT or WPS keypad makes PF1 the GOLD key, overriding any current definition of PF1, unless you set a different key as GOLD.
- SET NOPENDING DELETE
  Using DELETE or typing new text does not erase a selection.
- SET SECTION FILE PROMPTING
  When you save attributes and other customizations, EVE prompts for a section file.
- SET SCROLL MARGINS 0 0
  Scrolling begins automatically when you move past the top or bottom of the window.
- SET TABS INSERT
  Using TAB inserts a tab character. You can set the tab mode to insert spaces instead of a tab character or to move the cursor without inserting anything.
- SET TABS INVISIBLE
  Tab characters appear during editing as blank spaces, as opposed to visible tabs, which appear as a small HT (horizontal tab).
- SET WIDTH 80
  The width of the EVE screen layout is the same as your terminal setting---typically 80 columns.
- SET WILDCARDS VMS
  The WILDCARD FIND command uses wildcards such as the asterisk (*) to match any amount of text on a line, the percent sign (%) to match a single character on a line, and so on.

### A.3.2 EVE Default Buffer-Specific Settings

This list shows the EVE default settings for buffer-specific settings:

- FORWARD
  Commands like FIND and MOVE BY LINE move the cursor to the right and down. You can change the direction to reverse (left and up).
- INSERT MODE
  Characters you type are inserted at the current position, pushing existing text to the right and down. You can change the mode to overstrike.
- SET BUFFER MODIFIABLE
  Buffers you create can be modified (edited). You can set the buffer to unmodifiable.
- SET BUFFER WRITE
  On exiting, EVE writes out (saves) your buffers if you have made any changes. You can set the buffer to read-only.
- SET JOURNALING ALL
  Buffer-change journaling is enabled for all your text buffers.
- SET LEFT MARGIN 1
  This is the leftmost column. When you press the Return key or use FILL commands or when EVE wraps text, new lines start at the left margin of the buffer.
- SET PARAGRAPH INDENT 0
  Paragraphs you create or ones you reformat with FILL commands start at the current left margin of the buffer---with no indent.
- SET RIGHT MARGIN 79
  The default right margin is one column less than the width set for your terminal. If the width is 80 columns, the default right margin is 79. When you use FILL commands or when you type at the end of a line, EVE wraps text at the right margin of the buffer.
- SET TABS EVERY 8
  Tab stops are set at columns 9, 17, 25, 33, 41, and so on. You can set tab stops at different intervals.
- SET WRAP
  As you type text at the end of a line, EVE wraps text at the right margin of the buffer, without your having to press the Return key or use FILL commands.

When editing EVE command lines --- such as when you recall a command --- the default direction is reversed and the cursor is bound. The default mode on a character-cell terminal matches your terminal setting.

To find out the default settings, use the SHOW DEFAULTS BUFFER command. To find out the settings of the buffer you are editing, use the SHOW command.

You can save some EVE settings or attributes in a section file or as EVE-generated code in a DECTPU command file. You can set other attributes, such as margins and tab stops, in an initialization file.

When you use an initialization file to invoke EVE, commands in the initialization file for margins, tab stops, and other buffer-specific settings apply to the Main (or first) buffer and to an EVE system buffer named $DEFAULTS$. The $DEFAULTS$ buffer is a template buffer; when you create a buffer --- for example, by using the GET FILE command --- EVE uses the settings of the $DEFAULTS$ buffer so that each new buffer has the same settings. Thus, if your initialization file contains the command SET RIGHT MARGIN 70, each buffer you create will have that right margin.

This is a sample EVE initialization file that contains commands to set editing preferences and to define keys:

       !   MYINIT.EVE initialization file
       !
       SET LEFT MARGIN 5
       SET PARAGRAPH INDENT 4
       SET RIGHT MARGIN 70
       SET TABS EVERY 10
       SET SCROLL MARGINS 9% 9%
       SET FIND WHITESPACE
       !   Key definitions
       SET KEYPAD EDT
       DEFINE KEY= F20      SHOW BUFFERS
       DEFINE KEY= Ctrl/P   PAGINATE
       DEFINE KEY= GOLD-G   GET FILE
       DEFINE KEY= KP7      WPS GOLD R

### A.3.3 Saving Attributes

Attributes are global settings, some of which can be saved in a section file or DECTPU command file for future editing sessions. Table A-1 shows the settings that you can save.

Table A-1 EVE Commands for Setting Attributes
Command | Default Setting
--- | ---
SET BOX [NO]PAD | SET BOX PAD
SET BOX [NO]SELECT | SET BOX NOSELECT
SET [NO]CLIPBOARD | SET NOCLIPBOARD
SET CURSOR BOUND FREE | SET CURSOR FREE
SET [NO]DEFAULT COMMAND FILE | SET NODEFAULT COMMAND FILE
SET [NO]DEFAULT SECTION FILE | SET NODEFAULT SECTION FILE
SET FIND CASE [NO]EXACT | SET FIND CASE NOEXACT
SET [NO]EXIT ATTRIBUTE CHECK | SET EXIT ATTRIBUTE CHECK
SET [NO]SECTION FILE PROMPTING | SET SECTION FILE PROMPTING
SET [NO]PENDING DELETE | SET NOPENDING DELETE
SET TABS INSERT MOVEMENT SPACES | SET TABS INSERT
SET TABS [IN]VISIBLE | SET TABS INVISIBLE

If you have an EVE initialization file that contains commands for these settings, you can delete those command lines after you save the settings in your section file or command file.

Other global settings (such as scroll margins or the types of wildcards) and any buffer settings (such as margins or tab stops) are not saved. Typically, you use an initialization file for those settings.

#### A.3.3.1 EVE Commands for Saving Attributes

The following list summarizes the commands for saving attributes:

- SAVE ATTRIBUTES
  Saves attributes in a section file or command file, depending on your responses to EVE prompts or settings done with other EVE commands. If you save in a section file, the effect is the same as SAVE EXTENDED EVE. If you save in a command file, EVE generates a specially marked block of DECTPU statements for attribute settings and menu definitions, and either creates a command file or updates an existing command file with this block of statements.
- SAVE SYSTEM ATTRIBUTES
  Saves EVE default attributes in a section file or command file. This is useful if you want to restore your section file or command file to the standard EVE settings and menu definitions (see Section A.3.8).
- SAVE EXTENDED EVE
  Creates a section file, saving attributes, key definitions, menu definitions, compiled procedures, and other extensions, such as global variables set with a DECTPU statement. If you do not specify a section file on the command line, EVE prompts you for one or uses your default section file (if you set a default).
- SET BOX NOPAD
  Disables padding and overstriking for box editing, unless the mode of the buffer is overstrike.
- SET BOX NOSELECT
  Disables box-style selection, cutting, and pasting. Default setting.
- SET BOX PAD
  Enables padding and overstriking for box editing, regardless of the mode of the buffer. Default setting.
- SET BOX SELECT
  Enables box selection, cutting, and pasting.
- SET DEFAULT COMMAND FILE
  Determines the command file for saving attributes. Does not determine the command file to be executed at startup, if any.
- SET DEFAULT SECTION FILE
  Determines the section file for saving attributes. Does not determine the section file to be executed at startup.
- SET EXIT ATTRIBUTE CHECK
  If you have changed attributes and then exit or quit, EVE asks if you want to save your changes. Default setting.
- SET NODEFAULT COMMAND FILE
  When you save attributes, the default command file is TPU$COMMAND.TPU in your current directory or the command file that was executed at startup (see Section A.3.6). Default setting.
- SET NODEFAULT SECTION FILE
  When you save attributes, EVE asks for the name of the section file you want to create (unless you disabled section file prompting). Default setting.
- SET NOEXIT ATTRIBUTE CHECK
  Disables attribute checking, typically to speed up or simplify exiting or quitting. Does not apply to the editing session in which you issue the command. Applies only to the editing sessions in which you use the section file or command file in which you saved the setting.
- SET NOSECTION FILE PROMPTING
  Disables prompting for a section file when you save attributes, typically to speed up or simplify saving attributes in a default section file or in a command file.
- SET SECTION FILE PROMPTING
  When you save attributes, EVE prompts you for the name of a section file. Default setting.

You can save attributes during your editing session by using the SAVE ATTRIBUTES or SAVE EXTENDED EVE command or as part of exiting or quitting. By default, if you have changed attributes and not saved them, then on exiting EVE prompts you as follows:

    Command: SET CURSOR BOUND
    Command: SET FIND CASE EXACT
    Command: SET TABS VISIBLE
               .
               .
               .
    Command: EXIT
    Attributes were changed.  Save them? [YES]

If you want to save the changes, press the Return key. EVE then executes a SAVE ATTRIBUTES command before continuing the exit. If you do not want to save the changes, type No and press the Return key. EVE then continues exiting.

To disable this prompting --- typically, to make exiting faster or simpler --- use the SET NOEXIT ATTRIBUTE CHECK command. However, the command does not apply to the current editing session because exit checking is itself a global setting that you can save in a section file or command file. After you save it, the setting applies to future editing sessions in which you use the relevant section file or command file.

### A.3.4 Saving Attributes in a Section File

Typically, you save attributes in a section file. A section file is in binary form and saves attributes, key definitions (including learn sequences), menu definitions, compiled procedures, and other extensions to the editor---including any saved in the section file you are using. In effect, the section file is your customized version of EVE. Because the section file is binary, it is executed quickly at startup.

To create a section file, you can use the SAVE EXTENDED EVE command (as in previous versions of EVE) or the SAVE ATTRIBUTES command. When using SAVE EXTENDED EVE, you can specify the section file on the command line or let EVE prompt you for the section file name. When using SAVE ATTRIBUTES, you specify the section file as a response to a prompt.

To speed up saving in a section file, you can set a default section file, which you can then save in without having to specify the file each time you save attributes. You can also disable section file prompting.

The command shown in this example saves attributes and other customizations in a section file called MYSEC.TPU$SECTION in the current directory:

    Command: SAVE ATTRIBUTES
    Save attributes in a section file [YES]? Return
    File to save in: mysec
    DISK$1:[USER]MYSEC.TPU$SECTION;1 created

### A.3.5 EVE Settings for Saving Attributes

The following table shows the interaction of the settings for default section file and section file prompting:

Commands Settings | Effect with SAVE ATTRIBUTES
--- | ---
SET DEFAULT SECTION FILE SET SECTION FILE PROMPTING | When you save attributes, EVE asks you whether to save in a section file. If you respond Yes (the default response), EVE saves in your default section file. If you respond No, EVE asks whether to save in a command file.
SET DEFAULT SECTION FILE SET NOSECTION FILE PROMPTING | When you save attributes, EVE saves in your default section file without prompting.
SET NODEFAULT SECTION FILE SET SECTION FILE PROMPTING | When you save attributes, EVE asks whether to save in a section file. If you respond Yes, EVE asks for the name of a section file. If you respond No, EVE asks whether to save in a command file. Default settings.
SET NODEFAULT SECTION FILE SET NOSECTION FILE PROMPTING | When you save attributes, EVE asks whether to save in a command file (see Section A.3.6).

Typically, when you use SET DEFAULT SECTION FILE, you specify the section file you are going to use at startup for future editing sessions. The command does not determine the section file to be executed when you invoke the editor, but only the section file in which you save attributes and other customizations.

Section files may be quite large, depending on the number of key definitions, menu definitions, and procedures you save. If you have limited disk space, you should save in a command file, which requires less disk space. For more information about creating and using section files, see the EVE online help topic called Section Files.

### A.3.6 Saving Attributes in Command Files

A command file contains DECTPU procedures and statements that are compiled and executed at startup. In effect, this is a series of programs for extending EVE. (You can also use a command file for batch editing.) A command file may be slower at startup than a section file (depending on the number of procedures to be compiled and statements to be executed), but it takes up less disk space than a section file. In addition, a command file can be edited and printed. Also, if you edit your command file, you can recompile procedures during your editing session by using EXTEND commands. The default file type for command files is .TPU.

When you use the SAVE ATTRIBUTES command or when you save attributes on exiting or quitting, you can have EVE create or update a command file. EVE then generates a specially marked block of DECTPU statements for your settings and menu definitions. Thus, if you created a command file with procedures and key definitions of your own, you can have EVE append the block of attribute settings to this command file.

Example A-1 is an example of EVE-generated code for saving attributes in a command file.

Example A-1 EVE-Generated Code for Saving Attributes in a Command File

    ! EVE-generated code begin
    ! EVE attributes begin
    eve$set_find_case_sensitivity (FALSE);
    eve_set_box_noselect;
    eve_set_box_pad;
    eve_set_cursor_bound;
    eve_set_nodefault_command_file;
    eve_set_nodefault_section_file;
    eve_set_exit_attribute_check;
    eve_set_pending_delete;
    eve_set_nosection_file_prompting;
    eve_set_tabs ('INSERT');
    eve_set_tabs ('VISIBLE');
    ! EVE attributes end
    ! EVE-generated code end

To save attributes in a command file, use the SAVE ATTRIBUTES command, as follows:

    Command: SAVE ATTRIBUTES
    Save attributes in a section file [YES]? no
    Save attributes in a command file [YES]? Return
    Enter file name [TPU$COMMAND.TPU] MYCOM
    14 lines written to file DISK$1:[USER]MYCOM.TPU;1

Previous | Next | Contents | Index

| privacy and legal statement |
6489PRO_052.HTML