HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)

e
ex(1) ex(1)
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
COLUMNS and LINES environment vari-
ables. See the window editor option below for more information. These values can also be changed to
adhere to the UNIX Standard environment (see standards(5)).
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
.
directory= dirname (dir)
Specify the directory in which the editor work area should be placed. This option only
takes effect when a new work area is created. It should be set in EXINIT or .exrc
to affect the location of the work area file for the edit file specified on the command
line. The default is /var/tmp.
338 Hewlett-Packard Company 12 HP-UX 11i Version 3: February 2007