Options Used by :set

Table 9-1 contains brief descriptions of the important set command options. In the first column, options are listed in alphabetical order; if the option can be abbreviated, that abbreviation is shown in parentheses. The second column shows the default setting. The last column describes what the option does, when enabled.

This table lists set options for the Solaris version of vi, with the addition of important vim options. Other versions of vi may have more or fewer or different options. See your local documentation, or use :set all to see the full list. Options that receive a value are marked with an =.

Table 9-1. :set options

Option

Default

Description

autoindent (ai)

noai

In insert mode, indent each line to the same level as the line above or below. Use with the shiftwidth option.

autoprint (ap)

ap

Display changes after each editor command. (For global replacement, display last replacement.)

autowrite (aw)

noaw

Automatically write (save) the file if changed before opening another file with a command such as :n or before giving a Unix command with :!.

background (bg)

 

Describe the background so the editor can choose appropriate highlighting colors. Default value of dark or light depends on the environment in which the editor is invoked. {vim}

backup (bk)

nobackup

Create a backup file when overwriting an existing file. {vim}

backupdir= (bdir)

.,~/tmp/,~/

Name directories in which to store backup files if possible. The ...

Get Unix in a Nutshell, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.