MPE/iX Shell and Utilities Reference Manual, Vol 2
vi(1) MPE/iX Shell and Utilities vi(1)
[.,.] d[elete][buffer][count][flags]
deletes the specified line range. After deleting the line range, the current line indica-
tor points to the line after the deleted range. A buffer may be specified as a letter
a–z; if so, deleted lines are saved in the buffer with that name. If an uppercase letter
is specified for buffer, the lines are appended to the buffer of the corresponding low-
ercase name. If no buffer name is given, deleted lines go to the unnamed buffer.
e[dit][!][+line][file]
ex [!][+line][file]
begins a new editing session on a new file; the new file replaces the old file on the
screen. Normally, this command is invalid if you have modified the contents of the
current file without writing it back to the file. Specifying an exclamation mark (!)
goes on to start a new session even if you have not saved the changes of the current
session.
You can specify line as either a line number or as a string of the form /regexp or
?regexp where regexp is a regular expression. When line is a line number, the cur-
rent line indicator is set to that position. When it has the form /regexp, vi searches
forward through the file for the first occurrence of regexp and sets the current line in-
dicator to that line. ?regexp is similar to /regexp, except that vi searches through
the file backwards. If you omit line and do not specify a file, the value of the current
line indicator does not change; otherwise if a file is specified, the current line indica-
tor is set to either the first or last line of the buffer, depending upon whether the com-
mand was issued in Vi or Ex mode.
The edit command does not destroy buffers, so you can use the yank and put com-
mands to move text between files.
f[ile][file]
changes the current file name to file and marks it [Not Edited]. If this file ex-
ists, it may not be overwritten without using the exclamation mark (!) variant of the
write command. If no file is specified, the editor displays information about the cur-
rent file.
[1,$] g[lobal][!]/pat/[commands]
matches pat against every line in the given range. On lines which match, the com-
mands are run. If the exclamation mark (!) variant is set, the commands are run on
lines which do not match. This is the same as using the v command (described later
in this section).
The global command and the undo command may not occur in the list of commands.
A subsequent undo command undoes the effect of the entire global command. In Ex
mode, multiple command lines may be entered by ending all but the last with
backslash (\). Commands which would take input are permitted; the input is includ-
1-664 Commands and Utilities