There are three kinds of options:
To check the value of an option,
:set option?
to check the value of an option,:verbose set option?
to also see where it was last set.set booloption " Set booloption.
set nobooloption " Unset booloption.
set booloption! " Toggle booloption.
set booloption& " Reset booloption to its default value.
set stroption=baz " baz
set stroption+=buzz " baz,buzz
set stroption^=fizz " fizz,baz,buzz
set stroption-=baz " fizz,buzz
set stroption= " Unset stroption.
set stroption& " Reset stroption to its default value.
set numoption=1 " 1
set numoption+=2 " 1 + 2 == 3
set numoption-=1 " 3 - 1 == 2
set numoption^=8 " 2 * 8 == 16
using concatenation:
execute "set stroption=" . my_variable
using :let
:
let &stroption = my_variable
See :help :set
and :help :let
.