|
OpenVMS User's Manual
8.9 Moving Text
You can use EVE commands to select sections of text for copying,
moving, deleting, or other editing operations. This section discusses
how to move text.
For information on how to move text from one buffer to another, see
Section 8.18.
You can also select a rectangular area (a box) of text rather than a
linear range of text to move, erase, or duplicate text. For information
about using box editing commands, see Section 8.11.
To move text, follow these steps:
Step |
Task |
1
|
Once you have invoked a file in EVE, place the cursor on the first
character you want to move.
|
2
|
Press the Select key.
|
3
|
Move the cursor to one character beyond the last character you want to
move. (In reverse direction, move the cursor to the last character, not
one beyond.) The text to be moved is highlighted in
reverse video. (If you decide not to remove text from
the buffer, press the Select key again to cancel the selection.)
|
4
|
Press the Remove key. EVE deletes the highlighted text from your screen
and places it in the Insert Here buffer.
|
5
|
Press the Insert Here key to insert text.
EVE inserts the text at the cursor location. You can insert the
text contained in the Insert Here buffer any number of times at any
cursor location until you select a new section of text and put that new
text in the Insert Here buffer. The Insert Here buffer contains
whatever text was last copied or removed.
|
Table 8-5 describes EVE editing keys used to move text.
Table 8-5 EVE Editing Keys That Move Text
Key or Key Sequence |
Function |
Insert Here
|
Same as the INSERT HERE or PASTE command. Inserts, at the current
position, text that you removed or copied.
|
Remove
|
Same as the REMOVE or CUT command. Removes the text that is marked with
SELECT or highlighted by FIND and places it in the Insert Here buffer.
|
Select
|
Marks text (highlighting it in reverse video) from the initial cursor
location to wherever you move the cursor. The text that is highlighted
is called the select range. To cancel the selection, press the Select
key again or use RESET.
|
GOLD Select
|
Same as RESET. Cancels any of the following and resets the direction of
the buffer to forward:
- Highlighting of a select or found range
- A press of the GOLD key (or GOLD
n combination for a repeat count)
- An incomplete or recalled command line, or Choices buffer display
- The output of SHOW, SHOW DEFAULTS BUFFER, SHOW SUMMARY, or SHOW
WILDCARDS, thereby returning you to the buffer you were working in
|
GOLD Remove
|
Same as the STORE TEXT or COPY command. Copies text that is marked with
SELECT or FIND, putting it in the Insert Here buffer. Text that is
copied is not removed from its original position.
|
Table 8-6 describes EVE commands used to move text.
Table 8-6 EVE Commands That Move Text
Command |
Function |
INSERT HERE
or PASTE
|
Inserts the text you copied or removed. By default, EVE defines the E2
key (Insert Here on the minikeypad on VT200, VT300, and VT400 series
terminals) and the KP9 key (on VT100 series terminals) as INSERT HERE.
|
REMOVE
or CUT
|
Removes the text that was marked with SELECT or highlighted by FIND,
and places it in the Insert Here buffer. By default, EVE defines the E3
key (Remove on the minikeypad on VT200, VT300, and VT400 series
terminals) and the KP8 key (on VT100 series terminals) as REMOVE.
|
RESET
|
Cancels any of the following and resets the direction of the buffer to
forward:
- Highlighting of a select or found range
- A press of the GOLD key (or GOLD
n combination for a repeat count)
- An incomplete or recalled command line, or Choices buffer display
- The output of SHOW, SHOW DEFAULTS BUFFER, SHOW SUMMARY, or SHOW
WILDCARDS, thereby returning you to the buffer you were working in
|
RESTORE SELECTION
|
Reinserts the text erased by a pending delete operation. For more
information about using pending delete, see Section 8.12.
|
SELECT
|
Highlights text in reverse video from the initial cursor location to
wherever you move the cursor. The text that is highlighted is called
the select range. To cancel the selection, enter the SELECT command
again or use RESET. By default, EVE defines the E4 key (Select on the
minikeypad on VT200, VT300, and VT400 series terminals) and the KP7 key
(on VT100 series terminals) as SELECT.
|
SELECT ALL
|
Highlights all text in reverse video in the current buffer regardless
of the cursor position. The text that is highlighted is called the
select range. To cancel the selection, enter the SELECT command or use
RESET. The SELECT ALL command temporarily disables pending delete to
avoid accidentally erasing all of the buffer.
|
SET NOPENDING DELETE
|
Default setting. Disables deletion of selected text when you use the
Delete key or type new text. If you select text in the buffer, typing
new text adds characters to the select range and using the Delete key
erases only the character to the left of the cursor.
|
SET PENDING DELETE
|
Enables pending delete, which lets you quickly erase blocks of text.
First enable pending delete, then use the SELECT command to choose the
text you want to erase. Erase the text by pressing the Delete key (or
any other key on the alpha-numeric keypad). To reinsert what you
deleted, move the cursor to where you want the text and enter the
RESTORE SELECTION command. The default is SET NOPENDING DELETE.
|
STORE TEXT
or COPY
|
Copies text that was marked with SELECT or FIND, placing it in the
Insert Here buffer. Text that is copied is not removed from its
original position.
|
Tutorial: Moving Text
To select, remove, and insert text from one location to another:
- Invoke EVE to edit the file RHYMES.DAT.
- Move the cursor to the beginning of the second line of RHYMES.DAT
and press the Select key.
- Press the down arrow key once.
The second line of text is
highlighted.
- Press the Remove key.
The second line of text is removed from
the current buffer.
She rhymes with tree,
and this one makes three.
[End of file]
|
- Press the Enter key twice and then press the Insert Here key.
The text in the Insert Here buffer is inserted at the current cursor
location.
She rhymes with tree,
also with bee,
and this one makes three.
[End of file]
|
- To exit from EVE, press Ctrl/Z.
8.10 Copying Text
With the COPY command, you can copy text elsewhere. The STORE TEXT
command is the same as the COPY command. You can substitute the STORE
TEXT command wherever the COPY command is used in the following example.
Tutorial: Copying Text
To copy text when the buffer is set in a forward direction:
- Invoke EVE to edit the file RHYMES.DAT.
- Move the cursor to the first line of text.
- Press the Select key.
- Press Ctrl/E to move the cursor to the end of the first line.
- Enter the COPY command. The Insert Here buffer now contains a copy
of the selected text.
- Move the cursor to the line above also with bee,.
- Press the Insert Here key. Your buffer should now look as follows:
She rhymes with tree,
She rhymes with tree,
also with bee,
and this one makes three.
[End of file]
|
- Move the cursor to the beginning of the first line of text. Use the
Select key and then the Remove key to delete the first line of text.
- To exit from EVE, press Ctrl/Z.
8.11 Box Editing
You can edit text that has rectangular areas, or boxes, as well as
standard linear ranges. For example, you can select a box containing a
list or columns in a table, and then cut and paste the box or perform
some other editing operation on the box.
8.11.1 Selecting a Box of Text
To select a box of text, follow these steps:
- Put the cursor where you want to start the selection---typically,
where you want the upper left corner of the box.
- Enter the BOX SELECT command.
- Move the cursor to where you want the diagonally opposite corner of
the box --- typically, moving from upper left to lower right.
As you move the cursor, text that you cross is highlighted in bold
video (a regular selection uses reverse video). The box is defined by
diagonally opposite corners. If you move from upper left to lower
right, the character that the cursor is on is outside the box,
that is, the lower right corner of the box is left of the cursor.
You can then edit the box by using any of the editing commands that
ordinarily work on a linear or a rectangular range. You need not
redefine keys. Refer to the Extensible Versatile Editor Reference
Manual for further information.
You can use FIND SELECTED if the selection does not cross lines or OPEN
SELECTED. You can also use pending delete.
If you are going to make several box edits---for example, in editing
multicolumn tables and lists---use the SET BOX SELECT command. SET BOX
SELECT redefines several commands and keys as the corresponding BOX
commands and makes other editing operations work on boxes instead of
linear ranges.
To cancel a box selection, repeat SELECT or BOX SELECT, or use RESET.
8.11.2 Cutting and Pasting a Box of Text
Cutting a box usually pads the area with spaces to keep the column
alignment of text to the right of the box. Pasting a box usually
overwrites existing text. Tab characters in the box, or that overlap
the box, are converted to spaces to keep the column alignment of text.
Table 8-7 lists the EVE commands for box editing.
Table 8-7 EVE Commands for Box Editing
Command |
Function |
BOX COPY
|
Copies a box of text without removing it, so you can paste it elsewhere.
|
BOX CUT
|
Cuts a box of text so you can paste it elsewhere, usually padding the
area with spaces to keep the column alignment of text to the right of
the box.
|
BOX CUT INSERT
|
Cuts a box, making text to the right of the box "collapse" to
the left, closing the gap.
|
BOX CUT OVERSTRIKE
|
Cuts a box, padding the area with spaces to keep the column alignment
of text to the right of the box.
|
BOX PASTE
|
Pastes a box of text you copied or cut, usually overwriting existing
text.
|
BOX PASTE INSERT
|
Pastes a box, pushing existing text to the right.
|
BOX PASTE OVERSTRIKE
|
Pastes a box, overwriting existing text.
|
BOX SELECT
|
Selects a box of text. Typically, you start at the upper left corner of
the box and move the cursor to where you want the lower right corner.
|
RESTORE BOX SELECTION
|
Puts back (undeletes) a box erased with pending delete, usually
overwriting existing text.
|
SET BOX NOPAD
|
Disables padding and overstriking for box editing unless the buffer is
in overstrike mode.
|
SET BOX NOSELECT
|
Default setting. Disables box selection, cutting, and pasting. Commands
such as SELECT, COPY, and REMOVE use standard linear ranges. To edit
boxes, use BOX commands.
|
SET BOX PAD
|
Default setting. Enables automatic padding and overstriking for box
editing, regardless of the buffer mode.
|
SET BOX SELECT
|
Enables box selection, making commands such as SELECT, REMOVE, and
INSERT HERE the same as the corresponding BOX commands, without having
to redefine keys.
|
Tutorial: Cutting and Pasting Text
To select and then cut and paste a box of text:
- Invoke EVE to create the buffer CITIES.DAT and enter the following
text:
Rome Paris New York
London Tunis Boston
Tokyo Bonn Lisbon
|
- Move the cursor to the left of the letter P in the word
Paris. Enter the BOX SELECT command.
- Move the cursor two spaces to the right of the second letter
n in the word Bonn---the diagonally opposite corner
of the box. The text that you cross is highlighted in bold video. Enter
the BOX CUT command.
EVE removes the box of text.
- Move the cursor to the right of the column that begins with the
words New York.
- Enter the BOX PASTE command.
EVE pastes the box of text into a
new column, as follows:
Rome New York Paris
London Boston Tunis
Tokyo Lisbon Bonn
[End of file]
|
8.11.3 SET BOX SELECT Commands
Table 8-8 lists the SET BOX SELECT commands.
Table 8-8 SET BOX SELECT Commands
Command |
Effect with SET BOX SELECT |
INSERT HERE or PASTE
|
BOX PASTE
|
REMOVE or CUT
|
BOX CUT
|
RESTORE SELECTION
|
RESTORE BOX SELECTION
|
SELECT
|
BOX SELECT
|
STORE TEXT or COPY
|
BOX COPY
|
You can then select, cut, and paste a box by using the Select, Remove,
and Insert Here keys, without having to redefine the keys.
8.12 Using Pending Delete
You can use pending delete to erase selected text. Pending delete
refers to erasing a selection by typing new text, pressing the space
bar, or by using delete (typically, pressing the Delete key).
With a box selection, pending delete works like BOX CUT, usually
padding the area with spaces to keep the column alignment of text to
the right of the box.
Pending delete gives you an alternative way of cutting and pasting text
because pending delete does not use the Insert Here buffer. For more
information about pending delete, see the EVE online help topic called
Pending Delete.
8.12.1 Erasing a Selection with Pending Delete
To erase a selection using pending delete, follow these steps:
- Invoke a file in EVE.
- To enable pending delete, use the SET PENDING DELETE command. The
default setting is SET NOPENDING DELETE.
- Select the text you want to erase. You can use SELECT or BOX
SELECT. (You cannot use SELECT ALL.)
- Type new text or use the DELETE command.
8.12.2 Restoring a Selection That Was Erased with Pending Delete
To put back (restore) the text you erased with pending delete, follow
these steps:
- Put the cursor where you want to restore the text. If restoring a
box selection, put the cursor where you want the upper left corner of
the box to be.
- Use RESTORE SELECTION. If a box selection was erased with pending
delete, use RESTORE BOX SELECTION. If you used SET BOX SELECT, you can
use RESTORE SELECTION (without having to redefine a key).
Restoring a box works like BOX PASTE, usually overwriting existing
text. When using the SET BOX NOPAD command, the effects of box editing
depend on the mode that the buffer is in (insert or overstrike, as
shown in the status line):
- In insert mode, cutting a box makes text to the right of the box
"collapse" to the left, closing the gap. Tab characters to
the right of the box are also converted to spaces to keep the column
alignment as the text collapses to the left. This method is useful for
removing columns from a table or list, such as in turning a 4-column
table into a 2-column table. Pasting a box pushes existing text to the
right, which is useful for adding columns in the middle of a table.
- In overstrike mode, cutting a box pads the area with spaces to keep
the column alignment of text to the right of the box. Pasting a box
overwrites existing text. The effects are the same as with SET BOX PAD,
which is the default setting.
The buffer mode also affects erasing a box with pending delete and
restoring an erased box.
8.13 Finding and Replacing Text
With EVE commands, you can search for specific text in a buffer. You
can search for every occurrence of specific text, and you can search
for text that is on a single line or spans a line break. Also, you can
search for text using wildcards. This section describes methods for
searching and replacing text.
Table 8-9 describes the EVE commands that locate text in a buffer.
Table 8-9 EVE Commands for Locating Text in a Buffer
Command |
Function |
FIND
|
Searches the current buffer for the text string you specify and
highlights the found text. The text that is highlighted is called the
found range.
|
FIND NEXT
|
Searches for the string of text you last specified with the FIND,
REPLACE, or WILDCARD FIND command.
|
FIND SELECTED
|
Searches for a string of text you have selected, rather than for a
typed string. The selection cannot cross more than one line.
|
SET FIND CASE EXACT
|
Enables case-exact searches. This is particularly useful to find or
replace search strings in lowercase letters only.
|
SET FIND CASE NOEXACT
|
Default setting. Disables case-exact searches so that EVE finds any
occurrence if you enter a search string in all lowercase letters.
|
SET FIND NOWHITESPACE
|
Default setting. Sets FIND and WILDCARD FIND commands to match tabs and
spaces exactly as you specify in the search string and to search for
strings that are entirely on one line.
|
SET FIND WHITESPACE
|
Sets FIND and WILDCARD FIND commands to treat spaces, tabs, and up to
one line break as "white space" so you can search for strings
of two or more words regardless of how they are separated.
|
SET WILDCARD VMS
|
Default setting on OpenVMS. Enables OpenVMS patterns for WILDCARD FIND.
|
SHOW WILDCARDS
|
Lists the wildcard patterns you can use with WILDCARD FIND.
|
WILDCARD FIND
|
Searches for a pattern of text, using wildcards.
|
8.13.1 Finding Text
Use the FIND command to locate specific text in the current buffer. By
default, EVE defines the E1 key (Find key on VT200, VT300, and VT400
series terminals and the PF1 key on VT100 series terminals) as the FIND
command.
If the search string contains all lowercase letters, EVE disregards the
case of letters and locates any occurrence of the string. Thus, the
search string the matches the, THE,
THe, and thE. If the search string contains one or
more uppercase letters, EVE finds only the occurrences of the string in
which the case of each letter is exactly the same. Therefore, the only
match for the search string tHis is tHis. For example:
- Enter the FIND command.
- Type the text (called the search string) that you want to locate.
The current direction of the buffer determines whether EVE first
searches in a forward or reverse direction.
If EVE cannot find the string in the current direction but finds it in
the opposite direction, EVE prompts you to change direction.
To search in the opposite direction, type YES (Y) and press the Enter
key. EVE moves the cursor to the first occurrence of the string in the
opposite direction. The current direction in the highlighted status
line does not change, however.
|