HP OpenVMS Systems Documentation

Content starts here

OpenVMS User's Manual


Previous Contents Index

  1. This line is preceded by an exclamation point (!), thus DECTPU ignores everything else on the line.
  2. Each EVE command corresponds to the name of a DECTPU procedure in the section file of standard EVE (SYS$SHARE:EVE$SECTION.TPU$SECTION).
    You can use the names of these DECTPU procedures in procedures you write, or you can execute them independently as DECTPU statements. If your command file contains both user-written procedures and executable DECTPU statements, put all the procedures before any of the executable statements.
  3. This command calls the EVE procedure EVE_NEXT_PARAGRAPH. Once the section file is compiled, you can use the new EVE command NEXT PARAGRAPH.
  4. For an EVE command to be usable with a repeat count (either by itself or as part of a learn sequence), it must return TRUE when it succeeds.
  5. The EVE command SET LEFT MARGIN requires a parameter specifying where to set the left margin. In this example, it is set to 10.
  6. The procedure named EVE_CHANGE_WIDTH can be invoked as the EVE command CHANGE WIDTH. The procedure name can also be invoked as the DECTPU executable statement EVE_CHANGE_WIDTH.
  7. The procedure called TPU$LOCAL_INIT is used as a section file.
  8. This DECTPU statement invokes the procedure EVE_MIMIC_EDT, which contains DECTPU statements that change the EVE settings. If you compile the sample command file, save it in a personal section file, and use that section file to invoke EVE. By doing this, the keypad setting, cursor style, and left margin are automatically set by the procedure EVE_MIMIC_EDT. As a result, EVE behaves like EDT at startup.
  9. This DECTPU statement uses the predefined EVE routine EVE$DEFINE_KEY to define the user-written procedure EVE_NEXT_PARAGRAPH for the key sequence Ctrl/P. The EVE$DEFINE_KEY routine ensures that the program bound to the key has an error handler. The DECTPU built-in DEFINE_KEY does not perform this step.
    There are four parameters to EVE$DEFINE_KEY. (This routine uses the same parameters as the DECTPU built-in DEFINE_KEY.) The first specifies the EVE procedure or command to be bound to a key. The second specifies the key to which the command should be bound. The third specifies the label that EVE should use for the key in the Help keypad diagram. The fourth is an EVE variable specifying the keymap list in which the key definition should be saved. Use the variable name EVE$X_USER_KEYS for the fourth parameter unless you are an advanced user implementing a special application.
  10. This DECTPU statement defines the procedure EVE_ZAPLINE for the key sequence GOLD O. This line demonstrates the DECTPU format to use when defining a sequence that consists of the GOLD key plus a letter key. Using "shift_key" makes the definition case insensitive, so that both o and O are defined.
  11. This statement defines the EVE command TWO WINDOWS for the F17 key.
  12. This statement defines the EVE command OTHER WINDOW for the key sequence Ctrl/G.
  13. This statement defines the EVE command GET FILE for the key sequence GOLD KP6. This keypad binding supersedes the previous definition of the GOLD KP6 key. The EVE_MIMIC_EDT procedure sets the keypad to EDT and the EDT keypad then binds the GOLD KP6 key sequence to the INSERT HERE command. However, this DECTPU statement changes the key binding to the GET FILE command. The pair of single quotation marks passes a null argument to the procedure.
  14. This statement defines the procedure EVE_TRANSPOSE for the key sequence GOLD F20.
  15. This statement calls the procedure TPU$LOCAL_INIT, which is then executed, creating new default settings for EVE.
  16. The SAVE statement is included to create a new section file. The device, directory, and file name of the section file are specified in parentheses and quotation marks.
  17. The QUIT command ends EVE processing and returns control to the DCL prompt.

A.8 Creating Initialization Files

Rather than defining keys or setting the characteristics of an editing session interactively, you can put EVE commands and key definitions in an initialization file. You can execute an initialization file when invoking EVE or during an editing session by using the execute procedure (@) command. For example,


Command: @SETUP_INIT

The following rules apply when creating initialization files:

  • Begin each command on a separate line.
  • Precede each line of comments with an exclamation point (!) and place separately from command lines.
  • Give the initialization file the file type .EVE.

This is an example of an initialization file:


SET TABS EVERY 5
SET LEFT MARGIN 15
SET RIGHT MARGIN 75
OVERSTRIKE MODE
DEFINE KEY=Ctrl/D ERASE WORD
DEFINE KEY=GOLD W START OF LINE
DEFINE KEY=KP5 FILL PARAGRAPH
!
!Binds the EDT forward function (KP4 on
!EDT keypad) to GOLD F
!
DEFINE KEY=GOLD F EDT KP4

You can specify an initialization file with the /INITIALIZATION qualifier, defined as EVE$INIT in your LOGIN.COM file or named EVE$INIT.EVE in your SYS$LOGIN directory. The following command invokes EVE with the initialization file named MY_INIT:


$ EDIT/TPU/INIT=WORK1:[ALEXIS]MY_INIT

By default, DECTPU uses the initialization file whose logical name is EVE$INIT. If you define this logical name in your LOGIN.COM file, DECTPU automatically uses your initialization file when you invoke EVE. For example, you could insert the following command in your LOGIN.COM file:


$ DEFINE EVE$INIT WORK1:[ALEXIS]MY_INIT.EVE

When EVE starts up, it looks first for a section file, then for a command file, and finally for an initialization file. Because an initialization file is executed after a section file and a command file, the definitions in an initialization file override those in a section file or a command file. For this reason, place commands that define the editing environment in either your command file or your initialization file.

A.8.1 Commands That Define the Editing Environment

Commands that define the environment include the following:

  • SET CURSOR BOUND or FREE
  • SET FIND WHITESPACE or NOWHITESPACE
  • SET GOLD KEY
  • SET KEYPAD
  • SET LEFT MARGIN
  • SET RIGHT MARGIN
  • SET SCROLL MARGINS
  • SET TABS AT or EVERY
  • SET TABS SPACES, MOVEMENT, or INSERT
  • SET TABS VISIBLE or INVISIBLE
  • SET WIDTH
  • SET WILDCARD VMS or ULTRIX
  • SET WRAP or NOWRAP
  • The default mode of the buffer: CHANGE MODE, OVERSTRIKE MODE, or INSERT MODE
  • The default direction of the buffer: CHANGE DIRECTION, FORWARD, or REVERSE

A.9 Saving Your Customizations in Startup Files

You can save key definitions, learn sequences, and DECTPU procedures in a startup file. With a startup file, you can save all the modifications you have made to EVE so you do not have to recreate your modifications at each editing session.

EVE has three types of startup files:

  • Section files
  • Command files
  • Initialization files

You can customize section files and command files interactively from the EVE editor. You create initialization files separately.

When saving your customizations in a section file or command file, use the SAVE ATTRIBUTES command or the SAVE EXTENDED EVE command when you exit from or quit the editor.

A.9.1 EVE Commands for Saving Attributes

This list summarizes the commands for saving attributes:

  • SAVE ATTRIBUTES
    Saves attribute settings and user menu definitions in a section file or command file, depending on your responses to EVE prompts or on 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 attribute settings 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.
  • SAVE EXTENDED EVE
    Creates a section file, saving attribute settings, 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 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 changed attributes, then when you 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. 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, but only to the editing sessions in which you use the saved section file or command file.

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

If you have changed attributes and not saved them, EVE asks if you want to save the changed attributes when you exit.

The following example shows how you can save attributes when you exit from EVE:


Command: SET CURSOR BOUND
Command: MOVING_TEXT
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 exiting. If you do not want to save the changes, type No and press Return. EVE then continues exiting.

To disable this prompting, for a faster or simpler exit, 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 and can be saved 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.

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

A.9.2 Using Customizations in Future Editing Sessions

There are several ways in which you can use all your customizations in future editing sessions. You can combine different types of startup files in the following ways:

  • Section file and an initialization file
  • Command file (EVE-generated code) and an initialization file
    If you have limited disk space, use a command file instead of a section file.
  • Command file (EVE-generated and user-generated code)
    You can write DECTPU procedures for attributes that typically are contained in an initialization file and use them in a command file containing EVE-generated code. Command files execute more quickly than an initialization file and offer more sophisticated editing tools.

A.10 Key Definitions in EVE Startup Files

This section lists the categories of commands for EVE attributes and features and shows in what type of startup file you can save them. By placing your definitions and procedures in a startup file, you can invoke the editor and automatically establish the editing environment your task requires.

The following table lists key definitions and what type of files they can be used in:

Key Definitions Section Command Initialization
DEFINE KEY X X X
LEARN X -- --
SET FUNC KEYS [NO]DECWINDOWS X X X
SET [NO]GOLD KEY X X X
SET KEYPAD [NO]EDT X X X
SET KEYPAD [NO]WPS X X X
SET KEYPAD VT100 X X X
SET KEYPAD NUMERIC X X X
UNDEFINE KEY X X X

A.10.1 Global Settings-1

The following table lists global settings-1 and what type of files they can be used in:

Global Settings-1 Section Command Initialization
SET BOX [NO]PAD X X X
SET BOX [NO]SELECT X X X
SET CURSOR FREE or BOUND X X X
SET [NO]CLIPBOARD X X X
SET [NO]DEFAULT COMMAND FILE X X X
SET [NO]DEFAULT SECTION FILE X X X
SET [NO]EXIT ATTRIBUTE CHECK X X X
SET FIND CASE [NO]EXACT X X X
SET [NO]PENDING DELETE X X X
SET [NO]SECTION FILE PROMPTING X X X
SET TABS INSERT, MOVEMENT, or SPACES X X X
SET TABS [IN]VISIBLE X X X

A.10.2 Global Settings-2

The following table lists global settings-2 and what type of files they can be used in:

Global Settings-2 Section Command Initialization
SET FIND [NO]WHITESPACE -- -- X
SET SCROLL MARGINS -- -- X
SET WIDTH -- -- X
SET WILDCARDS VMS or ULTRIX -- -- X

A.10.3 Buffer Settings

The following table lists buffer settings and what type of files they can be used in:

Buffer Settings Section Command Initialization
FORWARD or REVERSE -- -- X
INSERT MODE or OVERSTRIKE MODE -- -- X
SET BUFFER -- -- X
SET [NO]JOURNALING ALL -- -- X
SET LEFT MARGIN -- -- X
SET PARAGRAPH INDENT -- -- X
SET RIGHT MARGIN -- -- X
SET TABS AT or EVERY -- -- X
SET [NO]WRAP -- -- X

DECTPU procedures can be used in section and command files but not initialization files.

A.10.4 Saving in a Section File

To save a section file, use the SAVE EXTENDED EVE command or the SAVE ATTRIBUTES command. Using SAVE EXTENDED EVE, you can specify the section file on the command line or let EVE prompt you for the section file name. 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 --- that is, the section file you want to save in without having to specify the file each time you save attributes --- and you can disable section file prompting.

The command shown in this example saves attributes and other customized settings in a section file entitled 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

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

Command 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
Default settings. 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.
SET NODEFAULT SECTION FILE
SET NOSECTION FILE PROMPTING
When you save attributes, EVE asks whether to save in a command file.

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 customized settings. To specify the section file you want executed at startup, do either of the following:

  • Use EDIT/TPU/SECTION and specify the section file you want to use:


    $ EDIT/TPU/SECTION=MYEVE
    
  • Define the logical name TPU$SECTION to specify the section file and then use the EDIT/TPU command:


    $ DEFINE TPU$SECTION SYS$LOGIN:MYEVE
    $ EDIT/TPU
    

In specifying the section file to be executed, you must use a complete file specification, including the device (or disk) and directory; otherwise, DECTPU assumes the section file is in SYS$SHARE.

Section files may be quite large, depending on the number of customized settings 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.


Previous Next Contents Index