HP 3000 Manuals

Creating And Modifying Text [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation


HP EDIT Reference Manual

Creating And Modifying Text 

You create new text or modify existing text by executing one of the
following types of commands from Command mode that places HP EDIT in Text
Entry mode:

Append              Append To Character Append To Word Append To End Of
                    Line Append Line
Insert              Insert Character Insert Line
Replace             Replace Character Replace Word Replace Line
Overwrite           Overwrite

The append commands insert text after the indicated text units.  For
instance, when you execute the Append Line command, HP EDIT inserts a new
line after the current line.

The insert commands insert text before the current cursor position or
line.  For instance, when you execute the Insert Line command, HP EDIT
inserts a new line before the current line.

The replace commands delete the indicated unit of existing text and then
invoke the insert function within Text Entry mode.  For instance, when
you execute the Replace Line command, HP EDIT replaces the current line
with a blank line and enables you to insert text.

The Overwrite command enters Text Entry mode in the overwrite state, and
the cursor remains in its present location unless you specify a count.

In addition to these commands used for creating and modifying text, there
are other numerous text modification commands.  Refer to "Editing
Commands" in chapter 3 for information about text entry and text
modification commands.

Methods For Creating And Modifying Text 

You typically create and modify text using one of the following editing
methods:

   *   Alternating between modes
   *   Remaining in Text Entry mode

The first method provides easy access to all HP EDIT features and is
characterized by executing HP EDIT commands.  The second method provides
access to frequently used HP EDIT commands by pressing function keys and
focuses on entering text while remaining in Text Entry mode and using the
Text Entry terminal keys listed in table 2-1.  Your choice depends on
personal preference.

Alternating Modes Editing.     

Essentially, this method consists of executing one of the text entry
commands, performing the desired function, then returning to Command mode
after each operation.  You can use any of the terminal keys listed in
table 2-1, but typically you would rely more on the arrow keys and cursor
movement commands to position the cursor within the text.  You would then
enter and exit Text Entry mode to add or overwrite small amounts of text.

To write over two existing lines of text, insert a line of text between
these two lines, then save the file, you might do the following:

   1.  Move the cursor to the first line you want to write over.

   2.  Execute the Overwrite command.  HP EDIT enters Text Entry mode,
       enabling you to write over text.

   3.  Type over the existing text.  When you reach the end of the first
       line, press Return to move to the beginning of the next line.

       If desired, you can continue typing beyond the end of the line.
       HP EDIT wraps your text onto the next line, but does not realign
       text to account for word boundaries.  Consequently, words split on
       two different lines remain as they are.

   4.  Type over the existing text of the second line and press /Return 
       at the end of the line.  HP EDIT returns to Command mode.

   5.  Execute the Insert Line command.  HP EDIT opens a new line above
       the current line.

   6.  Type text as desired and press /Return when finished to return to
       Command mode.

   7.  Execute the Keep Text command.  HP EDIT keeps the changes to the
       file and remains in Command mode.

Text Entry Editing.     

This editing method differs from the previous one in that once you enter
Text Entry mode, you remain in this mode [REV DEL]until you have finished
editing.  After you have executed a text entry command, you use the
cursor arrow keys to move around in the window, the other insertion and
deletion terminal keys listed in table 2-1 to perform basic text
manipulations, and the function keys to perform commands.

The available function key command set is limited, so in order to execute
a command without a corresponding function key, you could either:

   *   Exit Text Entry mode and execute the command in Command mode.

            or 

   *   Press the MPE and Options function key from the main function key
       set, then press the Execute Command function key and enter the
       command by name.

To perform the same tasks described for the alternating modes method, you
would do the following:

   1.  Move the cursor to the first line you want to write over.

   2.  Execute the Overwrite command.  HP EDIT enters Text Entry mode,
       enabling you to write over text.

   3.  Type over the existing text.  When you reach the end of the first
       line, press Return to move to the beginning of the next line.

       If desired, you can continue typing beyond the end of the line.
       HP EDIT wraps your text onto the next line, but does not realign
       text to account for word boundaries.  Consequently, words split on
       two different lines remain as they are.

   4.  Type over the existing text on the second line.

   5.  Press the Insert Line key.  HP EDIT opens a new line above the
       current line.

   6.  Type text as desired.

   7.  Press the File Commands function key.

   8.  Press the Keep Text function key.  HP EDIT keeps the changes to
       the file and remains in Text Entry mode.

Alternating Between Overwrite And Insert 

HP EDIT enables you to use the Insert Character key in Text Entry mode to
alternate between inserting and overwriting text.

If you are currently writing over text and want to insert text or split
the line, you would press the Insert Character key.  HP EDIT then inserts
subsequent text and treats backspacing and other operations as if you had
initiated them from the insert state in Text Entry mode.  The effect is
the same as entering Text Entry mode using an insert or append command.

Conversely, after you insert text and want to write over text again, you
need only press the Insert Character key.  HP EDIT then writes over
existing text and replaces it with text you subsequently enter.

Entering The / Character 

The special key sequence of /Return switches HP EDIT from Text Entry mode
to Command mode.  Consequently, HP EDIT does not interpret the /
character as text when you press Return after pressing the / key.

If you want to type / at the end of a line, add a space after the / so
that when you press Return, HP EDIT does not exit Text Entry mode.  An
alternative approach is to type two slashes (//) before pressing Return.
This action generates a single slash and exits Text Entry mode.

Similarly, if you want to insert a / within existing text, make sure to
type two slashes before pressing Return.  If you do not, the text remains
as it currently exists and HP EDIT returns to Command mode.

Indenting Text Automatically 

To indent several lines of text, you could manually move the cursor to
the desired position on each successive line.  However, an automatic
indentation feature, called Autoindent, causes each new line of text to
match the indentation level established on the previous line.  You can
activate this feature by enabling the Auto Indent parameter from the Set
Options screen.  Once the feature is activated, you can use either the
Back Space, Back Arrow, or Back Tab keys to move the indentation level
toward the left margin.

Using Macro Counterparts 

All of the editing commands that place HP EDIT in Text Entry mode have
special counterparts that you can use within a macro.  When HP EDIT
encounters one of these commands in a macro, HP EDIT suspends macro
execution so that you can insert, append, overwrite or replace text from
the keyboard.  Execution of the macro continues when you return to
Command mode.

Refer to "Macro Commands" in chapter 3 for further information about
these interactive macros.



MPE/iX 5.0 Documentation