HP 3000 Manuals

Swap Cursor With Mark [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation


HP EDIT Reference Manual

Swap Cursor With Mark 

Purpose 

Swaps the cursor with the specified mark.

Default Syntax 

[n] @

where n represents a mark number from 1 to 11.  The default value of n is
1.

Description 

This command exchanges the cursor with a specified mark from 1 to 11.
When you execute this command, HP EDIT moves the cursor to the line and
column where the specified mark was located and moves the mark to the
line and column formerly occupied by the cursor.

Command Application 

This command assists you in viewing text at another location in the file
and then easily returning to the previous location to continue editing.
For instance, you may have finished editing a certain portion of a file
and and want to mark it for future reference.  You could assign a mark
number at this location with the Set Mark command.

Later during the editing session, you may decide to return to this
location.  Rather than manually scrolling to this location, you could
execute the Swap Cursor With Mark command to go to the location.  After
viewing the needed information, you could return to the previous location
by executing the command again.  At that point, the cursor and mark would
be positioned where they were before you initially executed the command.

Requirements 

You must have previously set the specified mark with the Set Mark command
before executing this command.  If you did not set the specified mark, HP
EDIT displays Mark #X has not been set on the message line, where X
equals an invalid mark number.

Procedure 

To swap the cursor with a specified mark: 

   1.  Type the desired mark number as the count.

   2.  Press the @ key.  HP EDIT moves the cursor to the specified mark
       and moves the mark to the former cursor position.

Example 

To swap the cursor with mark 2 and then return to the original cursor 
position: 

   1.  Type the number 2 as the count.  HP EDIT displays this number on
       the message line.

   2.  Press the @ key.  HP EDIT moves the cursor to mark 2 and moves
       mark 2 to the position formerly occupied by the cursor.

   3.  After you have finished viewing the needed information, type the
       number 2 as the count.  HP EDIT displays this number on the
       message line.

   4.  Press the @ key again.  HP EDIT moves the cursor and mark 2 to
       their former locations.

Related Commands 

       Go To Column/Mark
       Go To Line/Mark
       Set Distance To Mark
       Set Distance To Previous Location
       Set Mark
       Swap With Previous Location



MPE/iX 5.0 Documentation