Delete Word [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation
HP EDIT Reference Manual
Delete Word
Purpose
Deletes a word from a line.
Default Syntax
[n] CTRL d
where n is a count that represents the number of words to delete
beginning at the cursor position. The default value of n is 1.
Description
This command deletes one or more words from a line of text. The effect
of the command on text depends on how a word is defined. Refer to the
next section for the definition of a word.
When you execute this command, HP EDIT deletes word characters or digits
from the current cursor position to the next delimiter, and shifts the
remaining text on the line, if any, left to the cursor position.
If the cursor is positioned at the beginning of the first word, the
command deletes the entire word. If the cursor is positioned anywhere
else within the first word, the command deletes the word characters from
the cursor position to the next delimiter.
If the cursor is positioned on a delimiter when you execute the command,
HP EDIT only deletes the delimiter. If the delimiter is a space, HP EDIT
deletes the space and all spaces that may follow it.
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.
Procedures
To delete a single word:
1. Move the cursor to the first character of the word to be deleted.
2. Press and hold CTRL, then press the d key. HP EDIT deletes the
word and shifts the remaining text left to the cursor position.
To delete several words:
1. Move the cursor to the first character of the first word of the
group to be deleted.
2. Press and hold CTRL, then press the d key repeatedly until you
have deleted all of the unwanted words.
or
1. Type a count representing the number of words to delete.
2. Press and hold CTRL, then press the d key.
Example
To delete the word at the following cursor position:
This unwanted word will be deleted.
1. Move the cursor to the position shown above.
2. Press and hold CTRL, then press the d key. HP EDIT deletes the
word unwanted as shown:
This word will be deleted.
Related Commands
Delete Character
Delete Line
Delete Pattern
Replace Character
Replace Line
Replace Word
MPE/iX 5.0 Documentation