MPE/iX Shell and Utilities Reference Manual, Vol 2
vi(1) MPE/iX Shell and Utilities vi(1)
Vi and Ex work on text files. If a file contains the NUL character (value 0 or \0); it is turned
into the value 0x7F. The newline character is interpreted as a line delimiter. Each line is lim-
ited to a maximum length of {LINE MAX}-1 bytes, including the newline. If any lines ex-
ceed that length, they are truncated at that length. If the last line in the file does not end in a
newline, a newline is added. In all these abnormal cases, vi marks the file as modified and
displays a message.
Options
vi accepts the following options:
–c command
runs command before displaying any text on the screen. command is any Ex com-
mand. To specify multiple Ex commands, separate them with a vertical line charac-
ter (|) and enclose them in quotes. The quotes ensure that the shell does not interpret
the | as a pipe character. For example,
–c ’set all | ver’
runs both the set all and ver commands prior to displaying text.
–e invokes ex.
–R sets the readonly variable, preventing the accidental overwriting of files. Any
command that writes to a file requires the ! suffix.
–r tries to recover all specified files after a system or editor crash. If you do not specify
any files, vi ignores the
EXINIT
environment variable and any .exrc files, and
displays a list of all recoverable files.
–s turns on quiet mode; this tells the editor not to display file information messages, thus
allowing Ex to be used as a filter.
–t tag lets you search for a tag in the same way that you use with the Ex tag command (de-
scribed later).
–v puts the editor into Vi mode. With vi, its use is redundant.
–x prompts you for an encryption key. All files read and written are run through the
crypt(1) program using the key that you enter. The crypt program must be in the
current search path.
–w size sets the option variable window to size. See section Set Option Variables for more
information.
+command
is an obsolete version of the –c option.
Commands and Utilities 1-647