Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)

ex(1) OSS Shell and Utilities Reference Manual
indicated by the tag. This subcommand is affected by the autowrite, tags, and writeany
editor options.
The tag subcommand searches for tagstring in the tag file referred to by the tags editor
option until a reference to tagstring is found. The file pointed to by this reference is
loaded into the buffer, and the current line is set to the first occurrence of the pattern
specified in the tags file associated with the supplied tagstring. If the tags file contained
a line number reference, the current line is set to that line. If the pattern or line number
is not found, the subcommand writes an error message. If a file referred to by the tags
editor option does not exist or is not readable, the subcommand also writes an error mes-
sage.
una[bbrev] word
Deletes word from the list of abbreviations, as described by the abbrev subcommand.
u[ndo] Reverses the changes made by the previous editing subcommand (one that changes the
contents of the buffer). For this purpose, global and visual are considered single sub-
commands. An undo can itself be reversed. Commands that affect the external environ-
ment, such as write, edit, and next cannot be undone.
unm[ap][!] x
If no ! (exclamation point) is specified, removes the command-mode macro definition for
x; otherwise, removes the input-mode macro definition for x. See the map subcommand.
[line] vi[sual][type][count][flags]
Enters visual mode with the current line set to line. The type argument is optional, and
can be a - (minus sign), . (period), + (plus sign), or ˆ (circumflex), as in the z subcom-
mand, to specify the position of the specified line on the screen window. (The default is
to place the line at the top of the screen window.) The count argument specifies the
number of lines that is initially written; the default is the value of the window e
ditor
option. The Q subcommand exits visual mode. (For more information about the Q sub-
command, see the vi reference page.)
[range] w[rite][!][>>][file]
[range] w[rite][!][file]
[range] wq[!][>>][file]
Writes the specified lines (the whole buffer, if range is not specified) out to the file
represented by pathname file, writing to standard output the number of lines and bytes
written.
If file is specified and is not the current file, and the file named by file exists, then the
write fails. If the current file has been changed by the file subcommand and that file
exists, the write fails. In either case, you can force the write by appending the ! (excla-
mation point) character to the subcommand name. You can append to an existing file by
appending >> to the subcommand name.
If the file argument is preceded by a ! (exclamation point) character, the program named
in the SHELL environment variable is invoked with file as its second argument, and the
specified lines are passed as standard input to the subcommand. The ! in this usage must
be separated from the write subcommand by at least one space character. You can over-
ride the special meaning of ! by escaping it with a \ (backslash) character. This subcom-
mand is affected by the writeany and readonly editor options.
The subcommand wq is equivalent to a w followed by a q; wq! is equivalent to w! fol-
lowed
by q. If the current buffer has no pathname associated with it, the write subcom-
mand fails.
3116 Hewlett-Packard Company 527188-021