Vim options: Difference between revisions
From wikinotes
(→Usage) |
|||
Line 15: | Line 15: | ||
let foo = &filetype " assign an option to a variable | let foo = &filetype " assign an option to a variable | ||
set filetype=vim " assign a value to an option | set filetype=vim " assign a value to an option | ||
setlocal ignorecase " set the local variable value | |||
echo &l:ignorecase " get the local variable value | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Usage --> | </blockquote><!-- Usage --> |
Revision as of 04:09, 16 April 2023
Vim's configurable settings are called options
Documentation
:help option
https://vimhelp.org/options.txt.html
Usage
let foo = &filetype " assign an option to a variable set filetype=vim " assign a value to an option setlocal ignorecase " set the local variable value echo &l:ignorecase " get the local variable value
list, listchars
set list " activate listchars set listchars=tab:\|\ , " each tab preceded by '| '