Search notes:

vim options

Characteristics of options

The value of an option is one (or more?) of
The scope of an option can be
An option has a full name and an abbreviation (or short name).
Each option with their characteristics is stored in a vimoption struct.

Commands related to options

:set all shows all options and their values.
:set opt& reverts opt to its default value
:set opt&vim reverts opt to default VIM value
:set opt&vi to default vi value.
:set all& sets all options to their default value.
:set opt! toggle (invert) boolean options (such as autoindent).
:set invOPT toggles (boolean) OPT. Same effect as :set OPT!.
:set opt? displays the current value for the option.
:set opt< Remove local value of an option so that global value will be used.
:setl opt< Copy global value of an option to its local value.
:set opt=…, :set opt:… Assigns a value to a number or text option. (Whitespace on left side of = or : is ignored, on right side, whitespace is not allowed because it separates it from the next assignment)
:set opt+=… Add flag to flag option; increment number option by given value; append given value to text value
:set opt-=…
:set op^+=… Multiply number value; prepend value to text value
:options opens a window (or menu?) to choose options.
It is possible to set multiple values in one command:
:set ignorecase shiftwidth=4 autoindent

Setting options from modelines

It's possible to set some options from so called modelines.
For security reasons, not all options can be modified in modelines. Such options are marked with the P_SECURE and/or P_NO_ML option flag.

Hidden options

Apparently, some options are hidden. Trying to :set them is ignored, and they're not printed.
… not sure what to make of this!

Some options

autoread Automatically reload files whose content was changed outside of VIM.
autoindent
binary
bufhidden
buflisted
buftype
cindent
cinkeys A list of keywords that start an extra indent when smartindent or cindent is set
cinwords
compatible
endofline
eventignore a list of events that are ignored (not triggerd)
expandtab
fixendofline
helpfile
indentexpr
indentkeys
lisp
magic
paste disables or resets some options so as to be able to paste text into a buffer
pastetoggle key sequence that toggles the paste option.
revins
ruler
smartindent
showmatch
smarttab
softabstop
swapfile
textwidth
updatetime
vartabstop
wrapmargin
foldtext (see vim - folding text)

See also

src/option.c, src/optiondefs.h
Options that are local to a window are stored in winopt_T.

Index