Editing Commands [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation
HP EDIT Reference Manual
Editing Commands
After you have moved the cursor or the text to the desired location, you
can add or alter existing text. To add text, you use commands that
invoke Text Entry mode. In addition to adding text, this group of
commands enables you to insert, replace, or write over text. You can
continue editing text until you exit Text Entry mode.
Other text-altering commands are available in Command mode. Certain
function keys also enable you to alter text. Command mode text-altering
commands enable you to delete, copy, move, merge, and sort text.
Text Entry
Text entry functions and their associated commands are:
* Appending text
Append To Character
Append Word
Append To End Of Line
Append Line
* Inserting text
Insert Character
Insert Line
* Replacing text
Replace Character
Replace Word
Replace Line
* Overwriting text
Overwrite
Appending Text.
You can use the append commands to add text after the specified text
unit. When accessing an empty file, HP EDIT responds by opening the
first line of the file where you can begin to enter text.
Append Character adds text after the character where the cursor is
positioned. Append Word adds text after the end of the current word.
Append Line opens a new line after the current one and places the cursor
at the beginning of the new line. Append To End Of Line is equivalent to
executing the End Of Line command followed by the Append Character
command.
Inserting Text.
You can use the insertion commands to insert text within or between
existing words (Insert Character) or before existing lines (Insert Line).
When using the Insert Character command, the original text to the right
of the cursor may appear to disappear off the right edge of the window if
there is insufficient space on a line to insert new text. If this
happens, the text reappears on a new line when you exit Text Entry mode
or press the Return key.
You can use the Insert Character key to insert and write over text. If
you press the key while inserting text, HP EDIT switches from the insert
function to the overwrite function. You can then write over text. When
finished, you can press the Insert Character key again to return to the
insert function.
Replacing Text.
The replace commands combine the functions of the insert commands and the
delete commands. The commands first delete the specified unit of text.
They then enter Text Entry mode and enable you to insert new text at the
selected location.
To use these commands, you move the cursor to the character, word, or
line you want to delete and enter the appropriate command. HP EDIT
responds by deleting the requested text and invokes the insert function,
enabling you to insert text.
You can precede these commands with a count indicating the number of
units to delete before HP EDIT enters Text Entry mode.
Overwriting Text.
The Overwrite command enables you to replace text by writing over the
current text. To use the command, you move the cursor to the location
where you want to begin replacing text, enter the command, and then type
over the text to be replaced.
You can use the Insert Character key to write over and insert text. If
you press the key while writing over text, HP EDIT switches from the
overwrite function to the insert function. You can then insert text.
When finished, you can press the Insert Character key again to return to
the overwrite function.
Text Modification
Text modification functions and their associated commands are:
* Deleting text
Delete Character
Delete Word
Delete Line
Clear To Beginning Of Line
Clear To End of Line
Delete Leading Blanks
Delete Pattern
* Undoing changes
Undo Last Command
Undo Sequentially
Undo All
* Cutting and pasting text
Copy To Buffer
Copy And Append To Buffer
Cut To Buffer
Cut And Append To Buffer
Paste After
Paste Before
Paste Over
* Joining and justifying
Join Lines
Join Lines And Justify
Right Justify Line
* Shifting text
Shift Line Left
Shift Line Right
Shift End Of Line Left
Shift End Of Line Right
Center Text
* Swapping text
Swap Characters
Swap Words
Swap Lines
* Sorting text
Define Sort Key Columns
Sort Ascending
Sort Descending
* Converting text case
Upshift Character
Upshift Word
Upshift Line
Downshift Character
Downshift Word
Downshift Line
* Compressing blanks
Compress Blank Space
Compress Blank Lines
* Filling a line
Fill Character
[REV BEG]
* Checking spelling
* Check Spelling
[REV END]
Deleting Text.
The delete commands enable you to remove selected portions of text or
blank spaces within the text. You can delete a character (Delete
Character), a word (Delete Word), a line (Delete Line), or the remainder
of a line (Clear To End Of Line). The Clear To Beginning Of Line command
deletes text to the left of the cursor and shifts the remaining text to
the left margin.
You can also use the Delete Leading Blanks command to remove leading
blanks on one or more lines and left justify the remaining text. You can
execute the Delete Pattern command to delete text that matches the search
pattern you defined if the cursor is currently on text matching the
search pattern.
You can optionally use the Delete Character or Delete Line terminal keys
in Text Entry mode to perform a function similar to the commands of the
same name. You could also use the Clear Line terminal key to perform a
function similar to the Clear To End Of Line command.
[REV BEG]
In addition to deleting text by using the items listed above, you can
also delete text by replacing it with an empty replacement pattern.[REV
END]
Undoing Text Changes.
During your editing session, you may inadvertently enter incorrect text
while in Text Entry mode, or you may execute the wrong text-altering
command. HP EDIT features three error recovery commands, collectively
referred to as the undo commands, which enable you to restore text to its
previous state before you made the error. The command you select depends
on the number of text-altering changes you want to undo.
If you want to cancel the previously executed text-altering command, you
can execute Undo Last Command. If you want to cancel more than one
text-altering command in reverse sequential order, you can execute Undo
Sequentially the appropriate number of times. If you want to cancel all
text-altering commands executed since the file was read in or most
recently saved, you can execute Undo All Commands.
Cutting And Pasting Text.
You can use the cut and paste commands to copy or move blocks of text.
Two steps are required to perform these functions. [REV BEG]To copy
text, specify the block of text you want to copy,[REV END] then execute
the Copy To Buffer command. This leaves the copied text intact and
places a copy of it in the Cut/Paste buffer. You can add text to this
buffer any time using the Copy And Append To Buffer or Cut And Append To
Buffer commands. You then copy the text to the desired location using
the Paste Before or Paste After command.
To move text, [REV BEG]you specify the block of text you want to move,
[REV END]then execute the Cut To Buffer command. This command removes
the text block and places it in the Cut/Paste buffer. You can add text
to this buffer any time using the Copy And Append To Buffer or Cut And
Append To Buffer commands. You then move the text to the desired
location using the Paste Before or Paste After command.
The Paste Over command overlays a copy of the buffer contents over the
text starting at the current cursor position.
Joining And Justifying.
The Join Lines and Join Lines And Justify commands merge the text of two
or more lines by filling the remainder of a given line with text
beginning from the next line. HP EDIT joins as many words to the end of
a line as space permits.
The Join Line commands are useful when you want to combine partial lines
of text. The two commands differ in that the Join Lines command produces
a ragged right margin when it merges lines; the Join Lines And Justify
command right justifies this margin when it merges lines.
The Right Justify Line command extends a line of text to the right margin
boundary by adding blank spaces between words.[REV BEG] You can use the
Right Justify Line command on a selected block of text.[REV END]
Shifting Text.
The Shift Line Left command shifts the entire line of text to the left;
whereas the Shift End Of Line Left command shifts the trailing portion
(text to the right of the cursor) of a line to the left. The Shift Line
Right command shifts the entire line of text to the right; the Shift End
Of Line Right command shifts the trailing portion of a line to the right.
You can use the Center Text command to center a line of text between the
left margin and the right margin.
[REV BEG]
You can shift and center blocks of text that have been selected using the
Mark Character Block Start and Mark Line Block Start commands.[REV END]
Swapping Text.
The swap commands either exchange the current cursor character with the
next character (Swap Characters), the current cursor word with the next
word (Swap Words), or the current cursor line with the next line (Swap
Lines). The commands are useful in transposing the order of text units
currently in incorrect order.
Sorting Text.
During your editing session, you may want to [REV BEG]sort portions of
text that are not in[REV END] the desired order. For instance, your text
may contain a series of numbers on successive lines that you may want to
rearrange in either ascending or descending order. The [REV BEG]Sort
Ascending and Sort Descending commands enable you to arrange several
lines of text or a block of text[REV END] into the desired sequence.
To reorder lines, you can use the Define Sort Key Columns command to set
the left and right column boundaries for the key. HP EDIT uses text
within these boundaries for comparisons between lines during sorting.
You then execute either the Sort Ascending command to reorder the lines
from smallest to largest, or the Sort Descending command to reorder the
lines from largest to smallest.
Converting Text Case.
You may occasionally need to convert lowercase text to uppercase and vice
versa. You can use the three upshift commands to convert lowercase text
to uppercase. Similarly, you can use the three downshift commands to
convert uppercase text to lowercase.
[REV BEG]
You can also use the Upshift Line and Downshift Line commands to convert
the case of a selected block of text.[REV END]
Compressing Blanks.
While editing an existing file, you may discover that your text contains
several unwanted blanks between words. Rather than manually deleting
each blank, you could use the Compress Blank Space command to remove the
extra blank spaces and replace them with single blanks.
Similarly, you could use the Compress Blank Lines command to remove extra
unwanted blank lines and replace them with single blank lines.
[REV BEG]
You can also use the Compress Blank Lines and Copmress Blank Space
commands within a selected block of text.[REV END]
Filling A Line.
You may want to extend a particular text character to fill a portion or
all of the remaining line for a desired special effect, such as a comment
header line. You can use the Fill Character command for this purpose.
MPE/iX 5.0 Documentation