Home Explore Blog CI



neovim

1st chunk of `runtime/doc/options.txt`
84c18e045a31f7f3a2d8359b001d91dd45cb78c1c91c02ed0000000100000fa0
*options.txt*	Nvim


		  VIM REFERENCE MANUAL	  by Bram Moolenaar


Options							*options*

For an overview of options see quickref.txt |option-list|.

Vim has a number of internal variables and switches which can be set to
achieve special effects.  These options come in three forms:
	boolean		can only be on or off		*boolean* *toggle*
	number		has a numeric value
	string		has a string value

				      Type |gO| to see the table of contents.

==============================================================================
1. Setting options					*set-option* *E764*

							*:se* *:set*
:se[t][!]		Show all options that differ from their default value.
			When [!] is present every option is on a separate
			line.

:se[t][!] all		Show all options.
			When [!] is present every option is on a separate
			line.

								*E518* *E519*
:se[t] {option}?	Show value of {option}.
			NOTE: some legacy options were removed. |nvim-removed|

:se[t] {option}		Toggle option: set, switch it on.
			Number option: show value.
			String option: show value.

:se[t] no{option}	Toggle option: Reset, switch it off.

							   *:set-!* *:set-inv*
:se[t] {option}!   or
:se[t] inv{option}	Toggle option: Invert value.

				*:set-default* *:set-&* *:set-&vi* *:set-&vim*
:se[t] {option}&	Reset option to its default value.
:se[t] {option}&vi	Reset option to its Vi default value.
:se[t] {option}&vim	Reset option to its Vim default value.

:se[t] all&		Set all options to their default value.  The values of
			these options are not changed:
			  'columns'
			  'lines'
			Warning: This may have a lot of side effects.

					    *:set-args* *:set=* *E487* *E521*
:se[t] {option}={value}		or
:se[t] {option}:{value}
			Set string or number option to {value}.
			For numeric options the value can be given in decimal,
			hex (preceded with 0x) or octal (preceded with '0' or
			'0o').
			The old value can be inserted by typing 'wildchar' (by
			default this is a <Tab>).  Many string options with
			fixed syntax also support completing known values.
			See |cmdline-completion| and |complete-set-option|.
			White space between {option} and '=' is allowed and
			will be ignored.  White space between '=' and {value}
			is not allowed.
			See |option-backslash| for using white space and
			backslashes in {value}.

:se[t] {option}+={value}				*:set+=*
			Add the {value} to a number option, or append the
			{value} to a string option.  When the option is a
			comma-separated list, a comma is added, unless the
			value was empty.
			If the option is a list of flags, superfluous flags
			are removed.  When adding a flag that was already
			present the option value doesn't change.
			Also see |:set-args| above.

:se[t] {option}^={value}				*:set^=*
			Multiply the {value} to a number option, or prepend
			the {value} to a string option.  When the option is a
			comma-separated list, a comma is added, unless the
			value was empty.
			Also see |:set-args| above.

:se[t] {option}-={value}				*:set-=*
			Subtract the {value} from a number option, or remove
			the {value} from a string option, if it is there.
			If the {value} is not found in a string option, there
			is no error or warning.  When the option is a comma-
			separated list, a comma is deleted, unless the option
			becomes empty.
			When the option is a list of flags, {value} must be
			exactly as they appear in the option.  Remove flags
			one by one to avoid problems.
			The individual values from a comma separated list or
			list of flags can be inserted by typing 'wildchar'.
			See |complete-set-option|.
			Also see |:set-args| above.

The {option} arguments to ":set" may be repeated.  For example: >
	:set ai nosi sw=3 ts=3
If you make an error in one of the arguments, an error message will be given
and the following arguments will be ignored.

							*:set-verbose*
When 'verbose' is non-zero, displaying an option value will also tell where it
was last set.  Example: >
	:verbose set shiftwidth cindent?
<  shiftwidth=4 ~

Title: Setting Options in Vim
Summary
This section of the Vim documentation describes how to set and modify options within the Vim editor using the `:set` command. It covers various ways to display option values, toggle boolean options, set numeric and string options, and reset options to their default values. Additionally, it explains how to add, prepend, and remove values from options, including comma-separated lists and flags. The section also includes information on using 'wildchar' for completion, handling errors, and using the 'verbose' option to track where an option was last set.