vi Configuration
This section describes the following:
The
:set
commandOptions available with
:set
Sample ~/.exrc file
The :set Command
The :set
command lets you specify options that
change characteristics of your editing environment. Options may be
put in the
~/.exrc file or set
during a vi
session.
The colon shouldn’t be typed if the command is put in ~/.exrc.
Command |
Action |
---|---|
|
Enable option |
|
Disable option |
|
Give |
|
Show changed options. |
|
Show all options. |
|
Show value of option |
Options Used by :set
The following table
describes the options to :set
. The first column
includes the optional abbreviation, if there is one, and uses an
equals sign to show that the option takes a value. The second column
gives the default, and the third column describes the behavior of the
enabled option.
Option |
Default |
Description |
---|---|---|
autoindent (ai) |
|
In insert mode, indent each line to the same level as the line above or below. |
autoprint (ap) |
|
Display changes after each editor command. (For global replacement, display last replacement.) |
autowrite (aw) |
|
Automatically write (save) file if changed, before opening another
file with |
background (bg) |
Describe the background so the editor can choose appropriate
highlighting colors. Default value of | |
backup (bk) |
|
Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.