Go To Line/Mark
Purpose
Moves the cursor to a specified line or to a text mark.
Default Syntax
[n] g
where n is a count that represents a mark number from 1 to 11.
Description
This command provides you with two methods of moving the cursor to a
line. The method you select depends on whether you want to specify a
particular line number or a line that has been previously marked with the
Set Mark command.
Line Function
If you want to move the cursor to a particular line number, you enter the
command and then HP EDIT prompts you for a line number.
If you specify a line number for an unnumbered or variable file, HP EDIT
interprets your input as the number of records from the beginning of the
file.
If you specify a line number for a numbered file, HP EDIT compares the
specified line number with existing line numbers. If the numbers match,
the cursor moves to the specified number. However, If you specify a
non-existent line number that has a value between two adjacent line
numbers, HP EDIT moves the cursor to the smaller line number. For
instance, if a file contained line numbers 1.2 and 1.3 and you specified
1.24, the cursor would move to line 1.2.
Mark Function
If you want to move the cursor to marked text, you supply the mark number
as a count before entering the command. Before you use the command, you
should first mark the text that you want to retrieve, using the Set Mark
command.
Procedure
To move the cursor to a line:
1. Press the g key or press the Position Commands function key,
followed by the Go To Line function key. HP EDIT displays the
prompt Line? on the message line.
2. Enter the desired line number. HP EDIT shows the specified line
number beside the prompt.
3. Press Return. HP EDIT moves the cursor to the specified line.
To move the cursor to an existing text mark:
1. Enter the number corresponding to the text mark where you want to
move the cursor. HP EDIT displays the number you entered on the
message line.
2. Press the g key. HP EDIT moves the cursor to the line where the
marked text is located.
Related Commands
Go to Column/Mark
Set Mark