Merge remote-tracking branch 'Delapouite/add'

This commit is contained in:
Maxime Coste 2018-04-06 12:06:54 +10:00
commit 4ff0c58518

View File

@ -10,13 +10,16 @@ scripts.
Options can be modified using the `set-option` command: Options can be modified using the `set-option` command:
--------------------------------- ---------------------------------
set-option <scope> <name> <value> set-option [-add] <scope> <name> <value>
--------------------------------- ---------------------------------
<scope> can be *global*, *buffer*, *window* or *current* (See <scope> can be *global*, *buffer*, *window* or *current* (See
<<scopes#,`:doc scopes`>>). *current* relate to the narrowest scope in <<scopes#,`:doc scopes`>>). *current* relates to the narrowest scope in
which the option is already set. which the option is already set.
If `-add` is specified, the new value is *added* to the current one
instead of replacing it (the exact outcome depends on the type, see below).
[[unset-option]] [[unset-option]]
Options values can be unset in a specific scope with the `unset-option` Options values can be unset in a specific scope with the `unset-option`
command: command:
@ -56,7 +59,8 @@ Some types are usable for user defined options while some other types
are exclusively available to built-in options. are exclusively available to built-in options.
*int*:: *int*::
an integer number an integer number.
`set -add` performs a math addition
*bool*:: *bool*::
a boolean value, yes/true or no/false a boolean value, yes/true or no/false
@ -69,11 +73,12 @@ are exclusively available to built-in options.
is not a valid regex is not a valid regex
*coord*:: *coord*::
a line, column pair (separated by comma) a line, column pair (separated by a comma)
*<type>-list*:: *<type>-list*::
a list, elements are separated by a colon (:) if an element needs a list, elements are separated by a colon (:) if an element needs
to contain a colon, it can be escaped with a backslash to contain a colon, it can be escaped with a backslash.
`set -add` appends the new element to the list
*range-specs*:: *range-specs*::
a `:` separated list of a pair of a buffer range (`<begin a `:` separated list of a pair of a buffer range (`<begin
@ -84,6 +89,7 @@ are exclusively available to built-in options.
updated according to all the buffer modifications that happened updated according to all the buffer modifications that happened
since its timestamp. since its timestamp.
See <<highlighters#specs-highlighters,`:doc highlighters specs-highlighters`>>) See <<highlighters#specs-highlighters,`:doc highlighters specs-highlighters`>>)
`set -add` appends the new pair to the list
*line-specs*:: *line-specs*::
a `:` separated list of a line number and a corresponding flag a `:` separated list of a line number and a corresponding flag
@ -92,6 +98,7 @@ are exclusively available to built-in options.
an option of this type, its lines gets updated according to all the an option of this type, its lines gets updated according to all the
buffer modifications that happened since its timestamp. buffer modifications that happened since its timestamp.
See <<highlighters#specs-highlighters,`:doc highlighters specs-highlighters`>>) See <<highlighters#specs-highlighters,`:doc highlighters specs-highlighters`>>)
`set -add` appends the new spec to the list
*completions*:: *completions*::
a `:` separated list of `<text>|<docstring>|<menu text>` a `:` separated list of `<text>|<docstring>|<menu text>`
@ -104,7 +111,13 @@ are exclusively available to built-in options.
*flags(value1|value2|...)*:: *flags(value1|value2|...)*::
a set of flags, taking a combination of the given values joined by a a set of flags, taking a combination of the given values joined by a
'|' character '|' character.
`set -add` adds the new flag to the combination
*<type>-to-<type>-map*::
a `:` separated list of `key=value` pairs.
`set -add` adds the new pair to the hashmap or replace an already
existing key.
== Builtin options == Builtin options