HP-UX Reference (11i v2 04/09) - 1 User Commands A-M (vol 1)

e
ex(1) ex(1)
letter or a digit can be used to delimit the pattern instead of the
/.
command can be specified on multiple lines by hiding new-lines with a backslash. If
command is omitted, each line is printed.
append, change, and insert commands
are allowed; the terminating dot can be omitted if it ends command or commands.
The
visual command is also permitted (unless the
global command itself has
been issued from visual mode), and takes input from the terminal. (If command con-
tains a visual-mode command (that is,
open or
visual), the visual-mode command
must be terminated by the visual-mode
Q
command in order to proceed to the next
marked line.)
The
global command itself and the undo
command are not allowed in command.
The editor options
autoprint, autoindent, and
report are inhibited.
Appending a
! to the global command (that is,
g!) or using the alternate name v
causes command to be run on the lines within range that do not match the pattern.
insert line i[nsert][!]
Enter input mode; the input text is placed before the specified line. The last line
input becomes the current line, or the line before the target line, if no lines are input.
Appending
! to the command toggles the autoindent
editor option setting for this
insert only.
join range j[oin][!] count flags
Join together the text from the specified lines into one line. White space is adjusted to
provide at least one blank character (two if a period appears at the end of a line, or
none if the first character of a line is a closing parenthesis (
))). Extra white space at
the beginning of a line is discarded.
Appending a
! to the command causes a simpler join with no white-space processing.
list range l[ist] ount flags
Print the specified lines with tabs displayed as
ˆI and the end of each line marked
with a trailing $. (The only useful flag is # for line numbers.) The last line printed
becomes the current line.
map map key#naction
map! key#naction
The
map and map! commands define macros for use in visual mode. The first argu-
ment, key, can be a single character or a multicharacter sequence. In the special
sequence, #n, n is a digit referring to the function key n. Special characters, whi-
tespace, and newline must be escaped with a ˆV to be entered in the arguments. The
key argument cannot contain a colon (:) as its first character, nor can a multicharac-
ter sequence begin with an alphabetic character.
Macros defined by
map are effective in visual command mode. Macros defined by
map! are effective in visual input mode. When key or the function key corresponding
to #n is entered, the editor interprets the operation as though action were typed.
The
map or map! command without options displays the corresponding current list of
macros.
See also the editor options
keyboardedit, keyboardedit!, timeout, and
timeoutlen in Editor Options below.
mark line ma[rk] x
line k x
The specified line is given the specified mark x, which must be a single lowercase
letter (
a-z). x must be preceded by a space or tab. The current line position is not
affected. k is an alternate name for mark.
move range m[ove] line
Move the specified lines (range) to follow the target line. The first line moved
becomes the current line.
HP-UX 11i Version 2: September 2004 7 Hewlett-Packard Company Section 1273