MPE/iX Shell and Utilities Reference Manual, Vol 2

vi(1) MPE/iX Shell and Utilities vi(1)
address
An address refers to a line in the text being edited. An address may be an expression
involving the following forms:
. The value of the current line indicator.
n A line number indicating an absolute line in the file; the first line has abso-
lute line number 1.
$ The last line in the file.
+[n] n lines forward in the file. If you omit n, it defaults to 1.
[n] n lines backward in the file. If you omit n, it defaults to 1.
´x The value of the mark x.
/pat/ Search for regular expression pat forward from the current line.
?pat? Search for regular expression pat backwards from the current line.
Thus,
/pattern/+3
++
100
are three addresses: the first searches for a pattern and then goes three lines further; the second
indicates two lines after the current line; and the third indicates the 100th line in the file.
command
The command is a word, which can be abbreviated. Characters shown in square
brackets are optional. For example,
a[ppend]
indicates that the append command can be abbreviated to simply a.
! Some commands have a variant; this is usually toggled with an exclamation mark (!)
immediately after the command.
parameters
Many Ex commands use parameters to allow you to specify more information about
the command. Common parameters include:
buffer specifies one of the named areas for saving text. For more information, see
the description of buffers in the Object Manipulators section.
count is a positive integer, specifying the number of lines to be affected by the
command. If you do not count, it defaults to 1.
file is the path name for a file. If file includes the % character, vi replaces that
character with the path name of the current file. If file includes the # char-
acter, vi replaces that character with the path name of the alternate file. If
you do not specify file, the default is the current file.
1-660 Commands and Utilities