MPE/iX Shell and Utilities Reference Manual, Vol 2
vi(1) MPE/iX Shell and Utilities vi(1)
sh[ell] invokes a subshell. The environment variable
SHELL
is used to find the name of the
shell to run.
so[urce] file
runs editor commands from file. A file being run with source may contain source
commands of its own.
st[op] suspends the editor session and returns to system level. For further information, see
the description of the Vi command
CTRL-Z.
[.,.] s[ubstitute][/pat/repl/] [options][count][flags]
searches each line in the line range for the regular expression pat and replaces match-
ing strings with repl. Normally, Ex only replaces the first matching string in each
line; if options contains g (global), all matching strings are changed. If options con-
tains c (confirm), Ex first displays the line with caret (ˆ) characters marking the pat
matching location; you can then type y if you want Ex to go ahead with the substitu-
tion. pat cannot match over a line boundary; however in Ex mode, repl may contain
a newline, escaped by a preceding backslash (\). See the section on regular expres-
sions for full information on both pat and repl. If there is no pat and/or repl, Ex uses
the most recently specified regular expression and/or replacement string. You can
use any non-alphabetic character in place of the slash (/) to delimit pat and repl.
su[spend]
is the same as stop.
[.,.] t addr [flags]
is the same as the copy command.
ta[g][!] tagname
looks up tagname in the files listed in the variable tags. If the tag name is found in
a tags file, that file also contains the name of the file that contains the tag and a regu-
lar expression required within that file to locate that tag. If the given file is different
from the one you are currently editing, Ex normally begins editing the new file; how-
ever, if you have modified the current file since the last time it was written out, Ex
does not start editing a new file unless the tag command contains an exclamation
mark (!). (If autowrite is on, the current file is automatically written out and the
new file read in.) When the new file is read in, the regular expression from the tags
file is invoked with the variable magic off (see the Set Option Variables section).
Tag names are typically used to locate
C function definitions in C source files. The
first step is to create a tags file using the ctags(1) command. Once you do this,
you can use the Ex tag command to look up a particular function definition and go
directly to that definition in the file that contains it.
1-668 Commands and Utilities