Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
ex(1) OSS Shell and Utilities Reference Manual
map[!][x rhs]
Defines macros for use in visual mode. The first argument must be a single character or
the sequence #digit (one of the terminal’s numbered function keys). When this character
or function key is entered in visual mode, the action is as if the corresponding
rhs had
been entered. If the ! (exclamation point) character is appended to the subcommand
name map, the mapping is effective during input mode rather than command mode.
This allows x to have two different macro definitions at the same time: one for command
mode and one for input mode. Nonprintable characters, except for the Tab character,
require escaping with <Ctrl-V> (or <Ctrl-Q>) to be entered in the arguments. On cer-
tain block mode terminals, the mapping need not occur immediately (for example, it
might occur after the terminal transmits a group of characters to the system), but it
modifies the file as if it occurred immediately.
The map subcommand with no arguments writes all of the macros currently defined. If !
(exclamation point) is appended to the subcommand, only the macros effective during
input mode are written; otherwise, only the macros effective during command mode are
written.
[line] ma[rk] x
[line] k x Gives the specified line the specified mark x, which must be a single lowercase letter of
the POSIX locale. The current line position is not affected. The expression ’x can then
be used as an address in any subcommand requiring one. For example, the following
subcommand deletes all of the lines from the current one to the marked line:
.,’xd
In addition, see the vi ‘‘ and ’’ subcommands for uses of the mark in visual mode. If the
’x subcommand is used in nonvisual mode, the character marked is the first nonspace
character of the current line; otherwise, the character marked is the character at the
current column of the current line.
[range] m[ove] line
Moves the specified lines (range) after the target line (line). The current line is the first
of the moved lines.
n[ext][!][file ...]
Edits the next file from the argument list. If the current buffer has been modified since
the last write, the subcommand writes a warning and terminates. You can override this
action by appending the ! (exclamation point) character to the subcommand name (n!).
You can replace the argument list by specifying a new one as arguments to this subcom-
mand. Editing then starts with the first file on this new list. The current line is reset as
described for the edit subcommand. This subcommand is affected by the autowrite and
writeany editor options.
[range] nu[mber][count][flags]
[range] # [count][flags]
Writes the selected lines, each preceded with its line number in decimal. Nonprintable
characters, except for <Tab>, are expanded as specified by the print subcommand.
The only meaningful flag is l, which allows additional expanded writing of tabs and
End-of-Line characters by the list subcommand. The current line is the last line written.
3−110 Hewlett-Packard Company 527188-004