Replace Word [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation
HP EDIT Reference Manual
Replace Word
Purpose
Enables a user to delete a word and replace it with new text.
Default Syntax
[n] CTRL r
where n is a count that represents the number of words to delete before
entering Text Entry mode. The default value of n is 1.
Description
This command combines the functions of the Delete Word and Insert
Character commands. HP EDIT deletes the remainder of the word where the
cursor is currently located (plus up to n-1 additional words) and places
HP EDIT in Text Entry mode, enabling you to insert new text.
Word Definition
HP EDIT enables you to specify the type of characters that constitute an
HP EDIT word. There are four possible word definitions. You can specify
a definition other than the default value by changing the value of the
Word Category parameter from the Set Options screen.
The following word definition options are available:
[a-zA-Z0-9_'-] Words consist of upper and lowercase letters,
digits, underscores, apostrophes, and hyphens.
Words are separated by spaces and any
non-alphanumeric characters besides the underscore,
apostrophe, or hyphen. This is the default
definition.
[a-zA-Z0-9_] Words consist of upper and lowercase letters,
digits and underscores. Words are separated by
spaces and any non-alphanumeric characters besides
the underscore.
[a-zA-Z0-9] Words consists of upper and lowercase letters as
well as digits. Words are separated by spaces and
any non-alphanumeric characters.
[~ ] Words consist of any non-space characters separated
by spaces.
Procedure
To replace one or more words of text:
1. Move the cursor to the first character of the word or portion of
the word that you want to replace. To delete more than one word
on the current line, type a count that represents the number of
words you want to delete.
2. Press and hold CTRL while pressing the r key, or press the Edit
Commands function key, followed by the Replace Word function key.
HP EDIT deletes the word and places HP EDIT in Text Entry mode.
3. Add text as needed. HP EDIT adds the new text and shifts the
original text to the right.
4. Press / and Return when you have finished adding text to return to
Command mode.
Example
To replace LINE WILL BE:
This line will be replaced.
1. Move the cursor to the position shown and type 3 as a count.
2. Press and hold CTRL while pressing the r key. HP EDIT deletes the
words line will be and moves the cursor to the position shown:
This replaced.
3. Type word has been and press the space bar. Then press / and
Return to return to Command mode. HP EDIT replaces the text as
shown:
This word has been replaced.
To replace POTENTIALLY with POSITIVELY:
This feature is potentially wonderful!
1. Move the cursor to the position shown and press and hold CTRL
while pressing the r key. HP EDIT deletes tentially and moves the
cursor to the position shown:
This feature is powonderful!
2. Type sitively, press the space bar, then press / and Return to
return to Command mode. HP EDIT replaces the text as shown:
This feature is positively wonderful!
Related Commands
Append Line
Append To Character
Append To End Of Line
Append To Word
Delete Character
Delete Line
Delete Pattern
Delete Word
Insert Character
Insert Lines
Replace Character
Replace Line
MPE/iX 5.0 Documentation