9. Option descriptions
autoindent, ai default: noai
-
Can be used to ease the preparation of structured program text.
At the beginning of each
append,
change
or
insert
command
or when a new line is
opened
or created by an
append,
change,
insert,
or
substitute
operation within
open
or
visual
mode,
ex
looks at the line being appended after,
the first line changed
or the line inserted before and calculates the amount of white space
at the start of the line.
It then aligns the cursor at the level of indentation so determined.
-
If the user then types lines of text in,
they will continue to be justified at the displayed indenting level.
If more white space is typed at the beginning of a line,
the following line will start aligned with the first non-white character
of the previous line.
To back the cursor up to the preceding tab stop one can hit
^D.
The tab stops going backwards are defined at multiples of the
shiftwidth
option.
You
cannot
backspace over the indent,
except by sending an end-of-file with a ^D.
-
Specially processed in this mode is a line with no characters added
to it, which turns into a completely blank line (the white
space provided for the
autoindent
is discarded.)
Also specially processed in this mode are lines beginning with
an `\(ua' and immediately followed by a ^D.
This causes the input to be repositioned at the beginning of the line,
but retaining the previous indent for the next line.
Similarly, a `0' followed by a ^D
repositions at the beginning but without
retaining the previous indent.
-
Autoindent
doesn't happen in
global
commands or when the input is not a terminal.
autoprint, ap default: ap
-
Causes the current line to be printed after each
delete,
copy,
join,
move,
substitute,
t,
undo
or
shift command.
This has the same effect as supplying a trailing `p'
to each such command.
Autoprint
is suppressed in globals,
and only applies to the last of many commands on a line.
autowrite, aw default: noaw
-
Causes the contents of the buffer to be written to the current file
if you have modified it and give a
next,
rewind,
stop,
tag,
or
!
command, or a ^\(ua (switch files) or ^] (tag goto) command
in
visual.
Note, that the
edit
and
ex
commands do
not
autowrite.
In each case, there is an equivalent way of switching when autowrite
is set to avoid the
autowrite
(edit
for
next,
rewind!
for .I rewind ,
stop!
for
stop,
tag!
for
tag,
shell
for
!,
and
:e # and a :ta! command from within
visual).
beautify, bf default: nobeautify
-
Causes all control characters except tab, newline and form-feed
to be discarded from the input.
A complaint is registered the first time a
backspace character is discarded.
Beautify
does not apply to command input.
directory, dir default: dir=/tmp
-
Specifies the directory in which
ex
places its buffer file.
If this directory in not
writable, then the editor will exit abruptly when it fails to be
able to create its buffer there.
edcompatible default: noedcompatible
-
Causes the presence of absence of
g
and
c
suffixes on substitute commands to be remembered, and to be toggled
by repeating the suffices. The suffix
r
makes the substitution be as in the
~
command, instead of like
&.
errorbells, eb default: noeb
-
Error messages are preceded by a bell.*
If possible the editor always places the error message in a standout mode of the
terminal (such as inverse video) instead of ringing the bell.
hardtabs, ht default: ht=8
-
Gives the boundaries on which terminal hardware tabs are set (or
on which the system expands tabs).
ignorecase, ic default: noic
-
All upper case characters in the text are mapped to lower case in regular
expression matching.
In addition, all upper case characters in regular expressions are mapped
to lower case except in character class specifications.
lisp default: nolisp
-
Autoindent indents appropriately for
lisp
code, and the ( ) { } [[ and ]] commands in
open
and
visual
are modified to have meaning for lisp.
list default: nolist
-
All printed lines will be displayed (more) unambiguously,
showing tabs and end-of-lines as in the
list
command.
magic default: magic for ex and vi**
-
If
nomagic
is set, the number of regular expression metacharacters is greatly reduced,
with only `\(ua' and `$' having special effects.
In addition the metacharacters
`~'
and
`&'
of the replacement pattern are treated as normal characters.
All the normal metacharacters may be made
magic
when
nomagic
is set by preceding them with a `\'.
mesg default: mesg
-
Causes write permission to be turned off to the terminal
while you are in visual mode, if
nomesg
is set.
modeline default: nomodeline
-
If
modeline
is set, then the first 5 lines and the last five lines of the file
will be checked for ex command lines and the comands issued.
To be recognized as a command line, the line must have the string
ex:
or
vi:
preceeded by a tab or a space. This string may be anywhere in the
line and anything after the
:
is interpeted as editor commands. This option defaults to off because
of unexpected behavior when editting files such as
/etc/passwd.
number, nu default: nonumber
-
Causes all output lines to be printed with their
line numbers.
In addition each input line will be prompted for by supplying the line number
it will have.
open default: open
-
If noopen, the commands
open
and
visual
are not permitted.
This is set for
edit
to prevent confusion resulting from accidental entry to
open or visual mode.
optimize, opt default: optimize
-
Throughput of text is expedited by setting the terminal
to not do automatic carriage returns
when printing more than one (logical) line of output,
greatly speeding output on terminals without addressable
cursors when text with leading white space is printed.
paragraphs, para default: para=IPLPPPQPP LIbp
-
Specifies the paragraphs for the { and } operations in
open
and
visual.
The pairs of characters in the option's value are the names
of the macros which start paragraphs.
prompt default: prompt
-
Command mode input is prompted for with a `:'.
redraw default: noredraw
-
The editor simulates (using great amounts of output), an intelligent
terminal on a dumb terminal (e.g. during insertions in
visual
the characters to the right of the cursor position are refreshed
as each input character is typed.)
Useful only at very high speed.
remap default: remap
-
If on, macros are repeatedly tried until they are unchanged.
For example, if
o
is mapped to
O,
and
O
is mapped to
I,
then if
remap
is set,
o
will map to
I,
but if
noremap
is set, it will map to
O.
report default: report=5**
-
Specifies a threshold for feedback from commands.
Any command which modifies more than the specified number of lines
will provide feedback as to the scope of its changes.
For commands such as
global,
open,
undo,
and
visual
which have potentially more far reaching scope,
the net change in the number of lines in the buffer is
presented at the end of the command, subject to this same threshold.
Thus notification is suppressed during a
global
command on the individual commands performed.
scroll default: scroll=½ window
-
Determines the number of logical lines scrolled when an end-of-file
is received from a terminal input in command mode,
and the number of lines printed by a command mode
z
command (double the value of
scroll).
sections default: sections=SHNHH HU
-
Specifies the section macros for the [[ and ]] operations
in
open
and
visual.
The pairs of characters in the options's value are the names
of the macros which start paragraphs.
shell, sh default: sh=/bin/sh
-
Gives the path name of the shell forked for
the shell escape command `!', and by the
shell
command.
The default is taken from SHELL in the environment, if present.
shiftwidth, sw default: sw=8
-
Gives the width a software tab stop,
used in reverse tabbing with ^D when using
autoindent
to append text,
and by the shift commands.
showmatch, sm default: nosm
-
In
open
and
visual
mode, when a ) or } is typed, move the cursor to the matching
( or { for one second if this matching character is on the
screen. Extremely useful with
lisp.
slowopen, slow terminal dependent
-
Affects the display algorithm used in
visual
mode, holding off display updating during input of new text to improve
throughput when the terminal in use is both slow and unintelligent.
See
An Introduction to Display Editing with Vi
for more details.
tabstop, ts default: ts=8
-
The editor expands tabs in the input file to be on
tabstop
boundaries for the purposes of display.
taglength, tl default: tl=0
-
Tags are not significant beyond this many characters.
A value of zero (the default) means that all characters are significant.
tags default: tags=tags /usr/lib/tags
-
A path of files to be used as tag files for the
tag
command.
A requested tag is searched for in the specified files, sequentially.
By default, files called
tags
are searched for in the current directory and in /usr/lib
(a master file for the entire system).
term from environment TERM
-
The terminal type of the output device.
terse default: noterse
-
Shorter error diagnostics are produced for the experienced user.
warn default: warn
-
Warn if there has been `[No write since last change]' before a `!'
command escape.
window default: window=speed dependent
-
The number of lines in a text window in the
visual
command.
The default is 8 at slow speeds (600 baud or less),
16 at medium speed (1200 baud),
and the full screen (minus one line) at higher speeds.
w300, w1200, w9600
-
These are not true options but set
window
only if the speed is slow (300), medium (1200), or high (9600),
respectively.
They are suitable for an EXINIT
and make it easy to change the 8/16/full screen rule.
wrapscan, ws default: ws
-
Searches using the regular expressions in addressing
will wrap around past the end of the file.
wrapmargin, wm default: wm=0
-
Defines a margin for automatic wrapover of text during input in
open
and
visual
modes. See
An Introduction to Text Editing with Vi
for details.
writeany, wa default: nowa
-
Inhibit the checks normally made before
write
commands, allowing a write to any file which the system protection
mechanism will allow.