MPE/iX Shell and Utilities Reference Manual, Vol 2
vi(1) MPE/iX Shell and Utilities vi(1)
Substitutions are made in command before it is run. Any occurrences of an exclama-
tion mark (!) are replaced by the previous command line, while occurrences of per-
centage (%) and hash mark (#) characters are replaced with the path names of the cur-
rent and alternate files, respectively. If any such substitutions actually take place, the
new command line is displayed before it is run.
If the file has been modified and the variable autowrite is on, the file is written
before calling the command. If autowrite is off, a warning message is given.
[$] = displays the given line number. The current line indicator is not changed.
" a line of text
This is a comment.
[.,.] & [options][count][flags]
Repeats the last substitute command. If any options, count,orflags are specified,
they replace the corresponding items in the previous substitute command.
[.,.] ˜ [options][count][flags]
repeats the last substitute command; however, the regular expression that is used is
the last regular expression; that is, if there has been a search, the search’s regular ex-
pression is used. The simple substitute with no arguments, or the & command, uses
the regular expression from the previous substitute. substitute with an empty regular
expression uses the last regular expression, like ˜ . If any options, count,orflags are
specified, they replace the corresponding items in the previous substitute command.
@ buffer
executes each line in buffer as an Ex command. If you do not specify buffer or you
specify a buffer named @, the last buffer executed is used.
CTRL-D
displays the number of lines of text given by the scroll variable. The current line
indicator points to the last line displayed.
Special Characters in Ex Commands
When an Ex command contains the percentage character (%), the character is replaced by the
name of the current file. For example, if you are about to try out a macro and you are worried
that the macro may damage the file, you could say
!cp % /tmp
to copy the current file to a safe holding place. As another example, a macro could use the
percentage character (%) to refer to the current file.
Commands and Utilities 1-671