[an error occurred while processing this directive]
HP OpenVMS Systems Documentation |
OpenVMS User's Manual
8.13.1.1 When a Search String Is FoundWhen EVE finds the search string, the editor highlights it and moves the cursor to the first letter of the string. Refer to the Extensible Versatile Editor Reference Manual for a listing of the editing commands you can use on a highlighted search string. To cancel the highlighting, move the cursor off the search string or use the RESET command.
To find the next occurrence of the search string, press the Find key
twice or enter the FIND NEXT command.
If you want to match the case of your search exactly when searching for lowercase occurrences of a string, enter the SET FIND CASE EXACT command. Then when you enter a search string in all lowercase letters, EVE searches only for lowercase occurrences, skipping occurrences that contain uppercase letters. The setting applies to the FIND, REPLACE, and WILDCARD FIND commands. You can save the setting in your section file or command file for future editing sessions. The default setting is SET FIND CASE NOEXACT. EVE is sensitive to diacritical (accent) marks and locates only those occurrences of the string in which the diacritical marks are exactly the same. For example, in searching for ë, EVE does not find occurrences of e, é, è, or ê. In the following example, the commands enable case-exact searching and then find digital when it appears in lowercase only, skipping occurrences such as Digital or DIGITAL:
To use the FIND command with the existing file RHYMES.DAT:
Tutorial: Using the FIND SELECTED Command
To use FIND SELECTED to search for a string that is particularly complicated or is easily misspelled or mistyped:
8.13.3 Using WildcardsYou can use wildcards to search for text. The SHOW WILDCARDS command displays wildcard patterns for the current wildcard setting. To learn how to use wildcards:
8.13.4 Including White Space in a SearchUse the SET FIND WHITESPACE and SET FIND NOWHITESPACE commands to specify how the WILDCARD FIND and FIND commands treat the blank spaces between words, such as spaces, tabs, and line breaks. The SET FIND NOWHITESPACE command enables the commands to search for multiword strings on a single line, matching spaces and tabs exactly as they are found. SET FIND NOWHITESPACE is the default search behavior.
The SET FIND WHITESPACE command enables the WILDCARD FIND and FIND
commands to search for a string of two or more words regardless of how
they are separated. It enables the FIND commands to search for a string
that contains a single line break and more than one space or tab
between words.
The MARK and GO TO commands are useful for editing a large file and then returning to a specific location later in the editing session. The following table describes the MARK and GO TO commands:
To mark your position, enter the MARK command followed by a label name
of your choice. The label name can be one or more printable characters,
including alphanumeric and punctuation characters, spaces, and tab
characters. To return the cursor to the marked location, enter the GO
TO command followed by the label name.
With the REPLACE command, you can replace a text string in the current
buffer with another text string. This is useful if you have spelled a
word incorrectly throughout a long file and you want to fix every
occurrence of the misspelled word.
The REPLACE command is case sensitive. If the old string has any uppercase letters, EVE searches for exact case matches. If the old string is all lowercase, EVE searches for any occurrence of the string regardless of its case. If the new string has any uppercase letters, EVE replaces the string exactly. If the old and new strings are all lowercase, EVE replaces the string according to the following rules:
The following table shows how EVE uses the case of the strings:
If you want to find or replace only lowercase occurrences of a string, enter the SET FIND CASE EXACT command. Then if you enter a search string in all lowercase, EVE searches for only lowercase occurrences, skipping occurrences that contain uppercase letters. The setting applies to FIND, REPLACE, and WILDCASE FIND commands. The following table shows how EVE searches for and replaces only lowercase strings when you enter the SET FIND CASE EXACT command:
The default case setting is SET FIND CASE NOEXACT.
The following table shows the responses and their effect to the REPLACE command query:
8.14 Using Command Line QualifiersWhen you invoke EVE, you can use command line qualifiers to specify advanced EVE editing features. When using the character-cell screen updater, the default insert or overstrike mode is determined by your terminal setting. Table 8-10 lists the qualifiers that you can use with the EDIT command to invoke EVE.
8.14.1 Starting in an Alternate PositionStart position qualifiers determine the row and column where the cursor first appears in the buffer that you specified on the command line. For EVE, the default start position is 1,1---row 1, column 1, which is the upper left corner of the buffer. Use of start position qualifiers does not affect the initial cursor position when you create another buffer during the editing session and does not limit the buffer size. The format of the start position qualifier is as follows:
The fields are as follows:
Use the start position qualifier to begin editing at a particular line (or row) or at a particular character position (or column). For example, when you want to skip over a standard heading in a file or if a batch log file or error message tells you there is an error on a given line of a program, you can specify that line number as the starting row so that when you edit the program source file, the cursor moves directly to that line. The following command edits a file named test.com and puts the cursor on line 10, column 5:
If you want to start at a particular line in a file, you can omit the
second parameter (the column).
Work file qualifiers determine the work file that is used to swap memory for editing very large files. There is one work file per editing session. The work file is a temporary file that is automatically deleted when you exit. The default work file is named TPU$WORK.TPU$WORK. EVE creates the work file in SYS$SCRATCH unless you specify otherwise. There are two ways to specify a different work file:
8.14.3 Modifying the Main BufferModifying qualifiers determine whether you can modify the buffers specified on the command line. Modifications do not affect other buffers you create during the editing session. By default, you can modify the buffer by editing text in it. When you exit, EVE writes out the buffer to a file if the buffer has been modified. Use /NOMODIFY to examine a file without making any changes. You can then use cursor-movement commands but you cannot change the text. If you specify neither /MODIFY nor /NOMODIFY, your application determines if you can modify the buffer. EVE's default behavior is to modify the buffer. Use /MODIFY to override the effect of /READ_ONLY or /NOWRITE. Use /MODIFY with /READ_ONLY or /NOWRITE to practice editing operations without writing a file on exiting. For example, the following command invokes EVE, making the buffer you specified on the command line read-only (or no-write) and making it modifiable:
In EVE, you can set or change the modification attribute of the buffer
by using SET BUFFER commands.
You can invoke EVE using four different methods: from search lists,
with wildcards, with wildcard directory names, or with multiple input
files.
You can use a search list to invoke EVE to edit a file from that search list. For example:
In the example, if the first file in the search list exists, EVE copies
that file (HIRING.DAT) into a buffer and uses the file name and file
type as the buffer name. If the file does not exist, EVE tries to get
the second file (PROMOTION.LIS), and so on. If none of the files in the
search list exist, EVE creates an empty buffer named HIRING.DAT because
that is the first file in the search list.
When you invoke EVE to edit an existing file, you can use the asterisk (*) wildcard character as a substitute for some or all of the characters in the file name and file type. To use wildcards in EVE, follow the same rules as using wildcards in DCL. You can use the percent sign (%) wildcard character as a substitute for a single character at a time, and you can use the ellipsis ([...]) wildcard character as a substitute for a directory specification. If only one match is made, the file is displayed on your screen. If more than one match is made, EVE displays a list of matching files and prompts you to provide a more complete file specification. If no match is made, EVE creates a buffer named Main. If more than one file matches your wildcard request, EVE displays the matching files so you can choose the one you want. If no matching file is found, EVE creates an empty buffer named Main. If you use a search list or wildcard directory to specify an input file, EVE gets the first matching file found without displaying the $CHOICES$ buffer. For information about using the $CHOICES$ buffer, see the EVE online help topic called Choices Buffer. In the following example, a list of all files with the file type .TXT will be displayed:
If you specify *.TXT, EVE lists the files that match your wildcard
request in a second window in a system buffer named $CHOICES$.
You can use wildcards in a directory name ([...]) to invoke EVE and work either in your current directory or in a subdirectory of the current directory. This way of handling a search list or wildcard directory applies not only to the EDIT command, but also to EVE commands that use a file specification as a parameter. The following EVE commands use a file specification as a parameter: @ (at sign) In the following example, EVE searches through the directory tree and gets the first PINK.TXT file found, if there is one.
8.15.4 Invoking EVE with Multiple Input Files
You can specify multiple input files on the command line that invokes
EVE. The file names must be separated by commas with optional white
space. If wildcard characters are present in the file names, EVE
displays the matching files only for the first wildcard file name that
has more than one match. For the other ambiguous file names, EVE
outputs a warning message.
Journal files record your edits so that if a system failure interrupts your editing session, you can recover your work. Buffer-change journaling creates a separate journal file for each text buffer you create. This is the EVE default. Buffer-change journaling works both on DECwindows and on character-cell terminals. You recover one buffer at a time, typically by using RECOVER BUFFER commands in EVE. You can recover buffers from different editing sessions. The recovery restores only your text---it does not restore settings, key definitions, or the contents of system buffers (such as the Insert Here buffer) before the system failure. You can disable journaling when you invoke EVE by using the /NOJOURNAL qualifier on your command line. This is useful when you use EVE to examine a file without making any edits or for demonstration sessions. EVE file backups are disabled and cannot be enabled because the OpenVMS file system provides version numbers; therefore, no EVE mechanism is needed.
|