
e
ex(1) | ex(1) |
If type is speci®ed, 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 ®le .exrc in the HOME directory, or in .exrc in the current directory. If EXINIT exists, the .exrc ®le 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 ®le 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 speci®es 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 speci®ed. 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 ®rst 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 ®le if the work area has been modi®ed 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 ®le for the edit ®le speci®ed on the command line. The default is /var/tmp.
If the speci®ed directory is set from EXINIT or a .exrc ®le and is not writable by the user, the editor quits; if set interactively by the user, the editor issues an error
Section 1−252 | − 12 − |