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

e
ex(1) ex(1)
Shift the specified lines to the right by inserting whitespace The number of spaces
inserted is determined by the editor option
shiftwidth. The last line changed
becomes the current line.
(window) line
z type count flags
The number of lines specified by count are displayed. The default for count is the
value of the editor option
window.
If type is omitted, count lines following the specified line are printed.
If type is specified, it must be one of the following characters:
+ Display a window of lines following the addressed line.
- Place the addressed line at the bottom of the window of displayed lines.
. Place the addressed line at the center of the window.
^ Display a window of lines that is two windows prior to the addressed line.
= Display the addressed line at the center of the window with a line of dashes
above and below the addressed line.
The last line printed becomes the current line, except for the
=, where the addressed
line becomes the current line.
Editor Options
The command
ex has a number of options that modify its behavior. These options have default settings,
which can be changed using the set command (see above). Options can also be set at startup by putting
a set command string in the environment variable EXINIT, or in the file .exrc
in the HOME directory,
or in
.exrc in the current directory. If EXINIT exists, the .exrc file in the
HOME directory is not exe-
cuted. If the current directory is not the
HOME directory and the exrc editor option is set (see below),
the .exrc file in the current directory is executed after EXINIT or the HOME directory
.exrc.
The editor obtains the horizontal and vertical size of the terminal screen from the
terminfo database
(see terminfo (4)). These values can be overridden by setting the UNIX95 environment variable, which
specifies to use the XPG4 behavior for this command. COLUMNS and LINES environment variables. See
the window editor option below for more information.
The following table shows the defaults that differ for the various editor personalities:
Name Default Editor Options
edit nomagic novice noreadonly report=1 showmode
ex magic nonovice noreadonly report=5 noshowmode
vedit nomagic novice noreadonly report=1 showmode
vi magic nonovice noreadonly report=5 noshowmode
view magic nonovice readonly report=5 noshowmode
Editor options are Boolean unless otherwise specified. Abbreviations are shown in parentheses.
autoindent (ai) Indent each line in input mode (using blanks and tabs) to align with the previous
line. Indentation begins after the line appended, or before the line inserted or the
first line changed. Additional indentation can be provided as usual. Succeeding
lines are automatically indented to the new alignment.
Reducing the indent is achieved by typing
ˆD one or more times: the cursor is
moved back to the next multiple of shiftwidth spaces for each ˆD.Aˆ followed
by a ˆD removes all indentation temporarily for the current line. A 0 followed by a
^D removes all indentation.
Reversed by
noautoindent (noai). The default is noautoindent.
autoprint (ap) The current line is printed after each command that changes work area text. Auto-
print is suppressed in global commands. Reversed by noautoprint (noap).
The default is autoprint.
autowrite (aw) The work area is written out to the current file if the work area has been modified
and a next, rewind,or! command is given. Reversed by
noautowrite (noaw). The default is noautowrite.
beautify (bf) Cause all control characters other than tab, newline, and formfeed to be discarded
from the input text. Reversed by nobeautify (nobf). The default is nobeau-
tify.
HP-UX 11i Version 2: August 2003 12 Hewlett-Packard Company Section 1261