aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/options.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-11-25 19:15:05 +0000
committerJosh Rahm <joshuarahm@gmail.com>2024-11-25 19:27:38 +0000
commitc5d770d311841ea5230426cc4c868e8db27300a8 (patch)
treedd21f70127b4b8b5f109baefc8ecc5016f507c91 /src/nvim/options.lua
parent9be89f131f87608f224f0ee06d199fcd09d32176 (diff)
parent081beb3659bd6d8efc3e977a160b1e72becbd8a2 (diff)
downloadrneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.gz
rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.bz2
rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'src/nvim/options.lua')
-rw-r--r--src/nvim/options.lua531
1 files changed, 278 insertions, 253 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index 932d8f8d0e..9f86ef7489 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -7,14 +7,12 @@
--- @field alias? string|string[]
--- @field short_desc? string|fun(): string
--- @field varname? string
---- @field pv_name? string
---- @field type 'boolean'|'number'|'string'
---- @field hidden? boolean
+--- @field type vim.option_type|vim.option_type[]
--- @field immutable? boolean
--- @field list? 'comma'|'onecomma'|'commacolon'|'onecommacolon'|'flags'|'flagscomma'
--- @field scope vim.option_scope[]
--- @field deny_duplicates? boolean
---- @field enable_if? string|false
+--- @field enable_if? string
--- @field defaults? vim.option_defaults
--- @field secure? true
--- @field noglob? true
@@ -42,7 +40,9 @@
--- @field doc? string Default to show in options.txt
--- @field meta? integer|boolean|string Default to use in Lua meta files
---- @alias vim.option_scope 'global'|'buffer'|'window'
+--- @alias vim.option_scope 'global'|'buf'|'win'
+--- @alias vim.option_type 'boolean'|'number'|'string'
+--- @alias vim.option_value boolean|number|string
--- @alias vim.option_redraw
--- |'statuslines'
@@ -61,18 +61,11 @@ local function cstr(s)
end
--- @param s string
---- @return fun(): string
-local function macros(s)
- return function()
- return '.string=' .. s
- end
-end
-
---- @param s string
---- @return fun(): string
-local function imacros(s)
+--- @param t vim.option_type
+--- @return fun(): string, vim.option_type
+local function macros(s, t)
return function()
- return '.number=' .. s
+ return s, t
end
end
@@ -87,17 +80,19 @@ end
-- luacheck: ignore 621
return {
cstr = cstr,
+ --- @type string[]
+ valid_scopes = { 'global', 'buf', 'win' },
--- @type vim.option_meta[]
--- The order of the options MUST be alphabetic for ":set all".
options = {
{
abbreviation = 'al',
defaults = { if_true = 224 },
- enable_if = false,
full_name = 'aleph',
scope = { 'global' },
short_desc = N_('ASCII code of the letter Aleph (Hebrew)'),
type = 'number',
+ immutable = true,
},
{
abbreviation = 'ari',
@@ -179,7 +174,7 @@ return {
]=],
full_name = 'arabic',
redraw = { 'curswant' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('Arabic as a default second language'),
type = 'boolean',
},
@@ -242,7 +237,7 @@ return {
a different way.
]=],
full_name = 'autoindent',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('take indent for new line from previous line'),
type = 'boolean',
varname = 'p_ai',
@@ -262,7 +257,7 @@ return {
<
]=],
full_name = 'autoread',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('autom. read file when changed outside of Vim'),
type = 'boolean',
varname = 'p_ar',
@@ -435,12 +430,13 @@ return {
useful for example in source trees where all the files are symbolic or
hard links and any changes should stay in the local source tree, not
be propagated back to the original source.
- *crontab*
+ *crontab*
One situation where "no" and "auto" will cause problems: A program
that opens a file, invokes Vim to edit that file, and then tests if
the open file was changed (through the file descriptor) will check the
backup file instead of the newly created file. "crontab -e" is an
- example.
+ example, as are several |file-watcher| daemons like inotify. In that
+ case you probably want to switch this option.
When a copy is made, the original file is truncated and then filled
with the new text. This means that protection bits, owner and
@@ -462,7 +458,7 @@ return {
expand_cb = 'expand_set_backupcopy',
full_name = 'backupcopy',
list = 'onecomma',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_("make backup as a copy, don't rename the file"),
type = 'string',
varname = 'p_bkc',
@@ -597,6 +593,7 @@ return {
separated list of items. For each item that is present, the bell
will be silenced. This is most useful to specify specific events in
insert mode to be silenced.
+ You can also make it flash by using 'visualbell'.
item meaning when present ~
all All events.
@@ -620,6 +617,7 @@ return {
register Unknown register after <C-R> in |Insert-mode|.
shell Bell from shell output |:!|.
spell Error happened on spell suggest.
+ term Bell from |:terminal| output.
wildmode More matches in |cmdline-completion| available
(depends on the 'wildmode' setting).
@@ -670,7 +668,7 @@ return {
]=],
full_name = 'binary',
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('read/write/edit file in binary mode'),
type = 'boolean',
varname = 'p_bin',
@@ -698,7 +696,7 @@ return {
full_name = 'bomb',
no_mkrc = true,
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('a Byte Order Mark to the file'),
type = 'boolean',
varname = 'p_bomb',
@@ -732,13 +730,12 @@ return {
]=],
full_name = 'breakindent',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('wrapped line repeats indent'),
type = 'boolean',
},
{
abbreviation = 'briopt',
- alloced = true,
cb = 'did_set_breakindentopt',
defaults = { if_true = '' },
deny_duplicates = true,
@@ -775,7 +772,7 @@ return {
full_name = 'breakindentopt',
list = 'onecomma',
redraw = { 'current_buffer' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_("settings for 'breakindent'"),
type = 'string',
},
@@ -793,15 +790,14 @@ return {
current Use the current directory.
{path} Use the specified directory
]=],
- enable_if = false,
full_name = 'browsedir',
scope = { 'global' },
short_desc = N_('which directory to start browsing in'),
type = 'string',
+ immutable = true,
},
{
abbreviation = 'bh',
- alloced = true,
cb = 'did_set_bufhidden',
defaults = { if_true = '' },
desc = [=[
@@ -828,7 +824,7 @@ return {
expand_cb = 'expand_set_bufhidden',
full_name = 'bufhidden',
noglob = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('what to do when buffer is no longer in window'),
type = 'string',
varname = 'p_bh',
@@ -846,7 +842,7 @@ return {
]=],
full_name = 'buflisted',
noglob = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('whether the buffer shows up in the buffer list'),
tags = { 'E85' },
type = 'boolean',
@@ -854,7 +850,6 @@ return {
},
{
abbreviation = 'bt',
- alloced = true,
cb = 'did_set_buftype',
defaults = { if_true = '' },
desc = [=[
@@ -906,7 +901,7 @@ return {
expand_cb = 'expand_set_buftype',
full_name = 'buftype',
noglob = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
tags = { 'E382' },
short_desc = N_('special type of buffer'),
type = 'string',
@@ -991,7 +986,7 @@ return {
{
cb = 'did_set_cedit',
defaults = {
- if_true = macros('CTRL_F_STR'),
+ if_true = macros('CTRL_F_STR', 'string'),
doc = 'CTRL-F',
},
desc = [=[
@@ -1021,7 +1016,7 @@ return {
full_name = 'channel',
no_mkrc = true,
nodefault = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('Channel connected to the buffer'),
type = 'number',
varname = 'p_channel',
@@ -1099,14 +1094,13 @@ return {
option or 'indentexpr'.
]=],
full_name = 'cindent',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('do C program indenting'),
type = 'boolean',
varname = 'p_cin',
},
{
abbreviation = 'cink',
- alloced = true,
defaults = { if_true = '0{,0},0),0],:,0#,!^F,o,O,e' },
deny_duplicates = true,
desc = [=[
@@ -1118,14 +1112,13 @@ return {
]=],
full_name = 'cinkeys',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_("keys that trigger indent when 'cindent' is set"),
type = 'string',
varname = 'p_cink',
},
{
abbreviation = 'cino',
- alloced = true,
cb = 'did_set_cinoptions',
defaults = { if_true = '' },
deny_duplicates = true,
@@ -1136,14 +1129,13 @@ return {
]=],
full_name = 'cinoptions',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_("how to do indenting when 'cindent' is set"),
type = 'string',
varname = 'p_cino',
},
{
abbreviation = 'cinsd',
- alloced = true,
defaults = { if_true = 'public,protected,private' },
deny_duplicates = true,
desc = [=[
@@ -1155,14 +1147,13 @@ return {
]=],
full_name = 'cinscopedecls',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_("words that are recognized by 'cino-g'"),
type = 'string',
varname = 'p_cinsd',
},
{
abbreviation = 'cinw',
- alloced = true,
defaults = { if_true = 'if,else,while,do,for,switch' },
deny_duplicates = true,
desc = [=[
@@ -1175,7 +1166,7 @@ return {
]=],
full_name = 'cinwords',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_("words where 'si' and 'cin' add an indent"),
type = 'string',
varname = 'p_cinw',
@@ -1277,7 +1268,7 @@ return {
full_name = 'colorcolumn',
list = 'onecomma',
redraw = { 'current_window', 'highlight_only' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('columns to highlight'),
type = 'string',
},
@@ -1285,7 +1276,7 @@ return {
abbreviation = 'co',
cb = 'did_set_lines_or_columns',
defaults = {
- if_true = imacros('DFLT_COLS'),
+ if_true = macros('DFLT_COLS', 'number'),
doc = '80 or terminal width',
},
desc = [=[
@@ -1312,7 +1303,6 @@ return {
},
{
abbreviation = 'com',
- alloced = true,
cb = 'did_set_comments',
defaults = { if_true = 's1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,fb:•' },
deny_duplicates = true,
@@ -1323,7 +1313,7 @@ return {
]=],
full_name = 'comments',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('patterns that can start a comment line'),
tags = { 'E524', 'E525' },
type = 'string',
@@ -1331,7 +1321,6 @@ return {
},
{
abbreviation = 'cms',
- alloced = true,
cb = 'did_set_commentstring',
defaults = { if_true = '' },
desc = [=[
@@ -1340,7 +1329,7 @@ return {
Used for |commenting| and to add markers for folding, see |fold-marker|.
]=],
full_name = 'commentstring',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('template for comments; used for fold marker'),
tags = { 'E537' },
type = 'string',
@@ -1357,7 +1346,6 @@ return {
},
{
abbreviation = 'cpt',
- alloced = true,
cb = 'did_set_complete',
defaults = { if_true = '.,w,b,u,t' },
deny_duplicates = true,
@@ -1398,7 +1386,7 @@ return {
expand_cb = 'expand_set_complete',
full_name = 'complete',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('specify how Insert mode completion works'),
tags = { 'E535' },
type = 'string',
@@ -1406,7 +1394,6 @@ return {
},
{
abbreviation = 'cfu',
- alloced = true,
cb = 'did_set_completefunc',
defaults = { if_true = '' },
desc = [=[
@@ -1421,7 +1408,7 @@ return {
]=],
full_name = 'completefunc',
func = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
secure = true,
short_desc = N_('function to be used for Insert mode completion'),
type = 'string',
@@ -1497,7 +1484,7 @@ return {
expand_cb = 'expand_set_completeopt',
full_name = 'completeopt',
list = 'onecomma',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('options for Insert mode completion'),
type = 'string',
varname = 'p_cot',
@@ -1507,7 +1494,7 @@ return {
cb = 'did_set_completeslash',
defaults = { if_true = '' },
desc = [=[
- only for MS-Windows
+ only modifiable in MS-Windows
When this option is set it overrules 'shellslash' for completion:
- When this option is set to "slash", a forward slash is used for path
completion in insert mode. This is useful when editing HTML tag, or
@@ -1522,13 +1509,12 @@ return {
enable_if = 'BACKSLASH_IN_FILENAME',
expand_cb = 'expand_set_completeslash',
full_name = 'completeslash',
- scope = { 'buffer' },
+ scope = { 'buf' },
type = 'string',
varname = 'p_csl',
},
{
abbreviation = 'cocu',
- alloced = true,
cb = 'did_set_concealcursor',
defaults = { if_true = '' },
desc = [=[
@@ -1552,7 +1538,7 @@ return {
full_name = 'concealcursor',
list = 'flags',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('whether concealable text is hidden in cursor line'),
type = 'string',
},
@@ -1581,7 +1567,7 @@ return {
]=],
full_name = 'conceallevel',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('whether concealable text is shown or hidden'),
type = 'number',
},
@@ -1619,7 +1605,7 @@ return {
See 'preserveindent'.
]=],
full_name = 'copyindent',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_("make 'autoindent' use existing indent structure"),
type = 'boolean',
varname = 'p_ci',
@@ -1627,7 +1613,7 @@ return {
{
abbreviation = 'cpo',
cb = 'did_set_cpoptions',
- defaults = { if_true = macros('CPO_VIM') },
+ defaults = { if_true = macros('CPO_VIM', 'string') },
desc = [=[
A sequence of single character flags. When a character is present
this indicates Vi-compatible behavior. This is used for things where
@@ -1880,8 +1866,7 @@ return {
taken into account.
]=],
full_name = 'cursorbind',
- pv_name = 'p_crbind',
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('move cursor in window as it moves in other windows'),
type = 'boolean',
},
@@ -1900,7 +1885,7 @@ return {
]=],
full_name = 'cursorcolumn',
redraw = { 'current_window', 'highlight_only' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('highlight the screen column of the cursor'),
type = 'boolean',
},
@@ -1915,7 +1900,7 @@ return {
]=],
full_name = 'cursorline',
redraw = { 'current_window', 'highlight_only' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('highlight the screen line of the cursor'),
type = 'boolean',
},
@@ -1943,7 +1928,7 @@ return {
full_name = 'cursorlineopt',
list = 'onecomma',
redraw = { 'current_window', 'highlight_only' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_("settings for 'cursorline'"),
type = 'string',
},
@@ -1971,7 +1956,6 @@ return {
},
{
abbreviation = 'def',
- alloced = true,
defaults = { if_true = '' },
desc = [=[
Pattern to be used to find a macro definition. It is a search
@@ -1995,7 +1979,7 @@ return {
<
]=],
full_name = 'define',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('pattern to be used to find a macro definition'),
type = 'string',
varname = 'p_def',
@@ -2052,7 +2036,7 @@ return {
full_name = 'dictionary',
list = 'onecomma',
normal_dname_chars = true,
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('list of file names used for keyword completion'),
type = 'string',
varname = 'p_dict',
@@ -2067,7 +2051,7 @@ return {
full_name = 'diff',
noglob = true,
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('diff mode for the current window'),
type = 'boolean',
},
@@ -2091,7 +2075,6 @@ return {
},
{
abbreviation = 'dip',
- alloced = true,
cb = 'did_set_diffopt',
defaults = { if_true = 'internal,filler,closeoff' },
deny_duplicates = true,
@@ -2365,7 +2348,7 @@ return {
{
abbreviation = 'enc',
cb = 'did_set_encoding',
- defaults = { if_true = macros('ENC_DFLT') },
+ defaults = { if_true = macros('ENC_DFLT', 'string') },
deny_in_modelines = true,
desc = [=[
String-encoding used internally and for |RPC| communication.
@@ -2394,7 +2377,7 @@ return {
full_name = 'endoffile',
no_mkrc = true,
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('write CTRL-Z for last line in file'),
type = 'boolean',
varname = 'p_eof',
@@ -2420,7 +2403,7 @@ return {
full_name = 'endofline',
no_mkrc = true,
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('write <EOL> for last line in file'),
type = 'boolean',
varname = 'p_eol',
@@ -2465,7 +2448,7 @@ return {
]=],
expand = true,
full_name = 'equalprg',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
secure = true,
short_desc = N_('external program to use for "=" command'),
type = 'string',
@@ -2489,7 +2472,7 @@ return {
},
{
abbreviation = 'ef',
- defaults = { if_true = macros('DFLT_ERRORFILE') },
+ defaults = { if_true = macros('DFLT_ERRORFILE', 'string') },
desc = [=[
Name of the errorfile for the QuickFix mode (see |:cf|).
When the "-q" command-line argument is used, 'errorfile' is set to the
@@ -2511,7 +2494,7 @@ return {
{
abbreviation = 'efm',
defaults = {
- if_true = macros('DFLT_EFM'),
+ if_true = macros('DFLT_EFM', 'string'),
doc = 'is very long',
},
deny_duplicates = true,
@@ -2521,7 +2504,7 @@ return {
]=],
full_name = 'errorformat',
list = 'onecomma',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('description of the lines in the error file'),
type = 'string',
varname = 'p_efm',
@@ -2557,7 +2540,7 @@ return {
on, use CTRL-V<Tab>. See also |:retab| and |ins-expandtab|.
]=],
full_name = 'expandtab',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('use spaces when <Tab> is inserted'),
type = 'boolean',
varname = 'p_et',
@@ -2586,7 +2569,6 @@ return {
},
{
abbreviation = 'fenc',
- alloced = true,
cb = 'did_set_encoding',
defaults = { if_true = '' },
desc = [=[
@@ -2632,7 +2614,7 @@ return {
full_name = 'fileencoding',
no_mkrc = true,
redraw = { 'statuslines', 'current_buffer' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('file encoding for multi-byte text'),
tags = { 'E213' },
type = 'string',
@@ -2700,10 +2682,11 @@ return {
},
{
abbreviation = 'ff',
- alloced = true,
cb = 'did_set_fileformat',
defaults = {
- if_true = macros('DFLT_FF'),
+ condition = 'USE_CRNL',
+ if_true = 'dos',
+ if_false = 'unix',
doc = 'Windows: "dos", Unix: "unix"',
},
desc = [=[
@@ -2727,7 +2710,7 @@ return {
full_name = 'fileformat',
no_mkrc = true,
redraw = { 'curswant', 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('file format used for file I/O'),
type = 'string',
varname = 'p_ff',
@@ -2736,7 +2719,9 @@ return {
abbreviation = 'ffs',
cb = 'did_set_fileformats',
defaults = {
- if_true = macros('DFLT_FFS_VIM'),
+ condition = 'USE_CRNL',
+ if_true = 'dos,unix',
+ if_false = 'unix,dos',
doc = 'Windows: "dos,unix", Unix: "unix,dos"',
},
deny_duplicates = true,
@@ -2816,7 +2801,6 @@ return {
},
{
abbreviation = 'ft',
- alloced = true,
cb = 'did_set_filetype_or_syntax',
defaults = { if_true = '' },
desc = [=[
@@ -2845,14 +2829,13 @@ return {
full_name = 'filetype',
noglob = true,
normal_fname_chars = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('type of file, used for autocommands'),
type = 'string',
varname = 'p_ft',
},
{
abbreviation = 'fcs',
- alloced = true,
cb = 'did_set_chars_option',
defaults = { if_true = '' },
deny_duplicates = true,
@@ -2921,12 +2904,72 @@ return {
full_name = 'fillchars',
list = 'onecomma',
redraw = { 'current_window' },
- scope = { 'global', 'window' },
+ scope = { 'global', 'win' },
short_desc = N_('characters to use for displaying special items'),
type = 'string',
varname = 'p_fcs',
},
{
+ abbreviation = 'ffu',
+ cb = 'did_set_findfunc',
+ defaults = { if_true = '' },
+ desc = [=[
+ Function that is called to obtain the filename(s) for the |:find|
+ command. When this option is empty, the internal |file-searching|
+ mechanism is used.
+
+ The value can be the name of a function, a |lambda| or a |Funcref|.
+ See |option-value-function| for more information.
+
+ The function is called with two arguments. The first argument is a
+ |String| and is the |:find| command argument. The second argument is
+ a |Boolean| and is set to |v:true| when the function is called to get
+ a List of command-line completion matches for the |:find| command.
+ The function should return a List of strings.
+
+ The function is called only once per |:find| command invocation.
+ The function can process all the directories specified in 'path'.
+
+ If a match is found, the function should return a |List| containing
+ one or more file names. If a match is not found, the function
+ should return an empty List.
+
+ If any errors are encountered during the function invocation, an
+ empty List is used as the return value.
+
+ It is not allowed to change text or jump to another window while
+ executing the 'findfunc' |textlock|.
+
+ This option cannot be set from a |modeline| or in the |sandbox|, for
+ security reasons.
+
+ Examples:
+ >vim
+ " Use glob()
+ func FindFuncGlob(cmdarg, cmdcomplete)
+ let pat = a:cmdcomplete ? $'{a:cmdarg}*' : a:cmdarg
+ return glob(pat, v:false, v:true)
+ endfunc
+ set findfunc=FindFuncGlob
+
+ " Use the 'git ls-files' output
+ func FindGitFiles(cmdarg, cmdcomplete)
+ let fnames = systemlist('git ls-files')
+ return fnames->filter('v:val =~? a:cmdarg')
+ endfunc
+ set findfunc=FindGitFiles
+ <
+ ]=],
+ full_name = 'findfunc',
+ func = true,
+ scope = { 'global', 'buf' },
+ secure = true,
+ short_desc = N_('function called for :find'),
+ tags = { 'E1514' },
+ type = 'string',
+ varname = 'p_ffu',
+ },
+ {
abbreviation = 'fixeol',
cb = 'did_set_eof_eol_fixeol_bomb',
defaults = { if_true = true },
@@ -2941,7 +2984,7 @@ return {
]=],
full_name = 'fixendofline',
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('make sure last line in file has <EOL>'),
type = 'boolean',
varname = 'p_fixeol',
@@ -2967,7 +3010,6 @@ return {
},
{
abbreviation = 'fdc',
- alloced = true,
cb = 'did_set_foldcolumn',
defaults = { if_true = '0' },
desc = [=[
@@ -2982,7 +3024,7 @@ return {
expand_cb = 'expand_set_foldcolumn',
full_name = 'foldcolumn',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('width of the column used to indicate folds'),
type = 'string',
},
@@ -3000,13 +3042,12 @@ return {
]=],
full_name = 'foldenable',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('set to display all folds open'),
type = 'boolean',
},
{
abbreviation = 'fde',
- alloced = true,
cb = 'did_set_foldexpr',
defaults = { if_true = '0' },
desc = [=[
@@ -3026,13 +3067,12 @@ return {
full_name = 'foldexpr',
modelineexpr = true,
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('expression used when \'foldmethod\' is "expr"'),
type = 'string',
},
{
abbreviation = 'fdi',
- alloced = true,
cb = 'did_set_foldignore',
defaults = { if_true = '#' },
desc = [=[
@@ -3043,7 +3083,7 @@ return {
]=],
full_name = 'foldignore',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('ignore lines when \'foldmethod\' is "indent"'),
type = 'string',
},
@@ -3060,7 +3100,7 @@ return {
]=],
full_name = 'foldlevel',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('close folds with a level higher than this'),
type = 'number',
},
@@ -3087,7 +3127,6 @@ return {
},
{
abbreviation = 'fmr',
- alloced = true,
cb = 'did_set_foldmarker',
defaults = { if_true = '{{{,}}}' },
deny_duplicates = true,
@@ -3100,14 +3139,13 @@ return {
full_name = 'foldmarker',
list = 'onecomma',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('markers used when \'foldmethod\' is "marker"'),
tags = { 'E536' },
type = 'string',
},
{
abbreviation = 'fdm',
- alloced = true,
cb = 'did_set_foldmethod',
defaults = { if_true = 'manual' },
desc = [=[
@@ -3122,7 +3160,7 @@ return {
expand_cb = 'expand_set_foldmethod',
full_name = 'foldmethod',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('folding type'),
type = 'string',
},
@@ -3141,7 +3179,7 @@ return {
]=],
full_name = 'foldminlines',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('minimum number of lines for a fold to be closed'),
type = 'number',
},
@@ -3156,7 +3194,7 @@ return {
]=],
full_name = 'foldnestmax',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('maximum fold depth'),
type = 'number',
},
@@ -3208,7 +3246,6 @@ return {
},
{
abbreviation = 'fdt',
- alloced = true,
cb = 'did_set_optexpr',
defaults = { if_true = 'foldtext()' },
desc = [=[
@@ -3230,13 +3267,12 @@ return {
full_name = 'foldtext',
modelineexpr = true,
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('expression used to display for a closed fold'),
type = 'string',
},
{
abbreviation = 'fex',
- alloced = true,
cb = 'did_set_optexpr',
defaults = { if_true = '' },
desc = [=[
@@ -3283,14 +3319,13 @@ return {
]=],
full_name = 'formatexpr',
modelineexpr = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('expression used with "gq" command'),
type = 'string',
varname = 'p_fex',
},
{
abbreviation = 'flp',
- alloced = true,
defaults = { if_true = '^\\s*\\d\\+[\\]:.)}\\t ]\\s*' },
desc = [=[
A pattern that is used to recognize a list header. This is used for
@@ -3304,16 +3339,15 @@ return {
character and white space.
]=],
full_name = 'formatlistpat',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('pattern used to recognize a list header'),
type = 'string',
varname = 'p_flp',
},
{
abbreviation = 'fo',
- alloced = true,
cb = 'did_set_formatoptions',
- defaults = { if_true = macros('DFLT_FO_VIM') },
+ defaults = { if_true = macros('DFLT_FO_VIM', 'string') },
desc = [=[
This is a sequence of letters which describes how automatic
formatting is to be done.
@@ -3325,7 +3359,7 @@ return {
expand_cb = 'expand_set_formatoptions',
full_name = 'formatoptions',
list = 'flags',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('how automatic formatting is to be done'),
type = 'string',
varname = 'p_fo',
@@ -3348,7 +3382,7 @@ return {
]=],
expand = true,
full_name = 'formatprg',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
secure = true,
short_desc = N_('name of external program used with "gq" command'),
type = 'string',
@@ -3406,7 +3440,7 @@ return {
},
{
abbreviation = 'gfm',
- defaults = { if_true = macros('DFLT_GREPFORMAT') },
+ defaults = { if_true = macros('DFLT_GREPFORMAT', 'string') },
deny_duplicates = true,
desc = [=[
Format to recognize for the ":grep" command output.
@@ -3456,7 +3490,7 @@ return {
]=],
expand = true,
full_name = 'grepprg',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
secure = true,
short_desc = N_('program to use for ":grep"'),
type = 'string',
@@ -3761,15 +3795,16 @@ return {
try to keep 'lines' and 'columns' the same when adding and
removing GUI components.
]=],
- enable_if = false,
full_name = 'guioptions',
list = 'flags',
scope = { 'global' },
short_desc = N_('GUI: Which components and options are used'),
type = 'string',
+ immutable = true,
},
{
abbreviation = 'gtl',
+ defaults = { if_true = '' },
desc = [=[
When non-empty describes the text to use in a label of the GUI tab
pages line. When empty and when the result is empty Vim will use a
@@ -3785,16 +3820,17 @@ return {
present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
used.
]=],
- enable_if = false,
full_name = 'guitablabel',
modelineexpr = true,
redraw = { 'current_window' },
scope = { 'global' },
short_desc = N_('GUI: custom label for a tab page'),
type = 'string',
+ immutable = true,
},
{
abbreviation = 'gtt',
+ defaults = { if_true = '' },
desc = [=[
When non-empty describes the text to use in a tooltip for the GUI tab
pages line. When empty Vim will use a default tooltip.
@@ -3803,18 +3839,18 @@ return {
let &guitabtooltip = "line one\nline two"
<
]=],
- enable_if = false,
full_name = 'guitabtooltip',
redraw = { 'current_window' },
scope = { 'global' },
short_desc = N_('GUI: custom tooltip for a tab page'),
type = 'string',
+ immutable = true,
},
{
abbreviation = 'hf',
cb = 'did_set_helpfile',
defaults = {
- if_true = macros('DFLT_HELPFILE'),
+ if_true = macros('DFLT_HELPFILE', 'string'),
doc = [[(MS-Windows) "$VIMRUNTIME\doc\help.txt"
(others) "$VIMRUNTIME/doc/help.txt"]],
},
@@ -3911,7 +3947,7 @@ return {
{
abbreviation = 'hl',
cb = 'did_set_highlight',
- defaults = { if_true = macros('HIGHLIGHT_INIT') },
+ defaults = { if_true = macros('HIGHLIGHT_INIT', 'string') },
deny_duplicates = true,
full_name = 'highlight',
list = 'onecomma',
@@ -3926,7 +3962,8 @@ return {
desc = [=[
A history of ":" commands, and a history of previous search patterns
is remembered. This option decides how many entries may be stored in
- each of these histories (see |cmdline-editing|).
+ each of these histories (see |cmdline-editing| and 'msghistory' for
+ the number of messages to remember).
The maximum value is 10000.
]=],
full_name = 'history',
@@ -4050,11 +4087,11 @@ return {
English characters directly, e.g., when it's used to type accented
characters with dead keys.
]=],
- enable_if = false,
full_name = 'imcmdline',
scope = { 'global' },
short_desc = N_('use IM when starting to edit a command line'),
type = 'boolean',
+ immutable = true,
},
{
abbreviation = 'imd',
@@ -4068,16 +4105,16 @@ return {
Currently this option is on by default for SGI/IRIX machines. This
may change in later releases.
]=],
- enable_if = false,
full_name = 'imdisable',
scope = { 'global' },
short_desc = N_('do not use the IM in any mode'),
type = 'boolean',
+ immutable = true,
},
{
abbreviation = 'imi',
cb = 'did_set_iminsert',
- defaults = { if_true = imacros('B_IMODE_NONE') },
+ defaults = { if_true = macros('B_IMODE_NONE', 'number') },
desc = [=[
Specifies whether :lmap or an Input Method (IM) is to be used in
Insert mode. Valid values:
@@ -4095,15 +4132,14 @@ return {
It is also used for the argument of commands like "r" and "f".
]=],
full_name = 'iminsert',
- pv_name = 'p_imi',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('use :lmap or IM in Insert mode'),
type = 'number',
varname = 'p_iminsert',
},
{
abbreviation = 'ims',
- defaults = { if_true = imacros('B_IMODE_USE_INSERT') },
+ defaults = { if_true = macros('B_IMODE_USE_INSERT', 'number') },
desc = [=[
Specifies whether :lmap or an Input Method (IM) is to be used when
entering a search pattern. Valid values:
@@ -4118,8 +4154,7 @@ return {
option to a valid keymap name.
]=],
full_name = 'imsearch',
- pv_name = 'p_ims',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('use :lmap or IM when typing a search pattern'),
type = 'number',
varname = 'p_imsearch',
@@ -4152,7 +4187,6 @@ return {
},
{
abbreviation = 'inc',
- alloced = true,
defaults = { if_true = '' },
desc = [=[
Pattern to be used to find an include command. It is a search
@@ -4167,14 +4201,13 @@ return {
See |option-backslash| about including spaces and backslashes.
]=],
full_name = 'include',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('pattern to be used to find an include file'),
type = 'string',
varname = 'p_inc',
},
{
abbreviation = 'inex',
- alloced = true,
cb = 'did_set_optexpr',
defaults = { if_true = '' },
desc = [=[
@@ -4210,7 +4243,7 @@ return {
]=],
full_name = 'includeexpr',
modelineexpr = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('expression used to process an include line'),
type = 'string',
varname = 'p_inex',
@@ -4259,7 +4292,6 @@ return {
},
{
abbreviation = 'inde',
- alloced = true,
cb = 'did_set_optexpr',
defaults = { if_true = '' },
desc = [=[
@@ -4306,14 +4338,13 @@ return {
]=],
full_name = 'indentexpr',
modelineexpr = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('expression used to obtain the indent of a line'),
type = 'string',
varname = 'p_inde',
},
{
abbreviation = 'indk',
- alloced = true,
defaults = { if_true = '0{,0},0),0],:,0#,!^F,o,O,e' },
deny_duplicates = true,
desc = [=[
@@ -4324,7 +4355,7 @@ return {
]=],
full_name = 'indentkeys',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_("keys that trigger indenting with 'indentexpr'"),
type = 'string',
varname = 'p_indk',
@@ -4343,7 +4374,7 @@ return {
With 'noinfercase' the match is used as-is.
]=],
full_name = 'infercase',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('adjust case of match for keyword completion'),
type = 'boolean',
varname = 'p_inf',
@@ -4455,8 +4486,7 @@ return {
},
{
abbreviation = 'isk',
- alloced = true,
- cb = 'did_set_isopt',
+ cb = 'did_set_iskeyword',
defaults = { if_true = '@,48-57,_,192-255' },
deny_duplicates = true,
desc = [=[
@@ -4475,7 +4505,7 @@ return {
]=],
full_name = 'iskeyword',
list = 'comma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('characters included in keywords'),
type = 'string',
varname = 'p_isk',
@@ -4564,7 +4594,6 @@ return {
},
{
abbreviation = 'kmp',
- alloced = true,
cb = 'did_set_keymap',
defaults = { if_true = '' },
desc = [=[
@@ -4577,9 +4606,8 @@ return {
full_name = 'keymap',
normal_fname_chars = true,
pri_mkrc = true,
- pv_name = 'p_kmap',
redraw = { 'statuslines', 'current_buffer' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('name of a keyboard mapping'),
type = 'string',
varname = 'p_keymap',
@@ -4631,7 +4659,7 @@ return {
]=],
expand = true,
full_name = 'keywordprg',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
secure = true,
short_desc = N_('program to use for the "K" command'),
type = 'string',
@@ -4802,14 +4830,14 @@ return {
]=],
full_name = 'linebreak',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('wrap long lines at a blank'),
type = 'boolean',
},
{
cb = 'did_set_lines_or_columns',
defaults = {
- if_true = imacros('DFLT_ROWS'),
+ if_true = macros('DFLT_ROWS', 'number'),
doc = '24 or terminal height',
},
desc = [=[
@@ -4866,7 +4894,7 @@ return {
calling an external program if 'equalprg' is empty.
]=],
full_name = 'lisp',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('indenting for Lisp'),
type = 'boolean',
varname = 'p_lisp',
@@ -4888,8 +4916,7 @@ return {
expand_cb = 'expand_set_lispoptions',
full_name = 'lispoptions',
list = 'onecomma',
- pv_name = 'p_lop',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('options for lisp indenting'),
type = 'string',
varname = 'p_lop',
@@ -4897,7 +4924,7 @@ return {
{
abbreviation = 'lw',
defaults = {
- if_true = macros('LISPWORD_VALUE'),
+ if_true = macros('LISPWORD_VALUE', 'string'),
doc = 'is very long',
},
deny_duplicates = true,
@@ -4907,8 +4934,7 @@ return {
]=],
full_name = 'lispwords',
list = 'onecomma',
- pv_name = 'p_lw',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('words that change how lisp indenting works'),
type = 'string',
varname = 'p_lispwords',
@@ -4935,13 +4961,12 @@ return {
]=],
full_name = 'list',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('<Tab> and <EOL>'),
type = 'boolean',
},
{
abbreviation = 'lcs',
- alloced = true,
cb = 'did_set_chars_option',
defaults = { if_true = 'tab:> ,trail:-,nbsp:+' },
deny_duplicates = true,
@@ -5047,7 +5072,7 @@ return {
full_name = 'listchars',
list = 'onecomma',
redraw = { 'current_window' },
- scope = { 'global', 'window' },
+ scope = { 'global', 'win' },
short_desc = N_('characters for displaying in list mode'),
type = 'string',
varname = 'p_lcs',
@@ -5128,7 +5153,7 @@ return {
]=],
expand_cb = 'expand_set_encoding',
full_name = 'makeencoding',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('Converts the output of external commands'),
type = 'string',
varname = 'p_menc',
@@ -5155,7 +5180,7 @@ return {
]=],
expand = true,
full_name = 'makeprg',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
secure = true,
short_desc = N_('program to use for the ":make" command'),
type = 'string',
@@ -5163,7 +5188,6 @@ return {
},
{
abbreviation = 'mps',
- alloced = true,
cb = 'did_set_matchpairs',
defaults = { if_true = '(:),{:},[:]' },
deny_duplicates = true,
@@ -5186,7 +5210,7 @@ return {
]=],
full_name = 'matchpairs',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('pairs of characters that "%" can match'),
type = 'string',
varname = 'p_mps',
@@ -5207,12 +5231,12 @@ return {
},
{
abbreviation = 'mco',
- defaults = { if_true = imacros('MAX_MCO') },
+ defaults = { if_true = macros('MAX_MCO', 'number') },
full_name = 'maxcombine',
scope = { 'global' },
short_desc = N_('maximum nr of combining characters displayed'),
type = 'number',
- hidden = true,
+ varname = 'p_mco',
},
{
abbreviation = 'mfd',
@@ -5348,7 +5372,7 @@ return {
no lines are checked. See |modeline|.
]=],
full_name = 'modeline',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('recognize modelines at start or end of file'),
type = 'boolean',
varname = 'p_ml',
@@ -5396,7 +5420,7 @@ return {
]=],
full_name = 'modifiable',
noglob = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('changes to the text are not possible'),
tags = { 'E21' },
type = 'boolean',
@@ -5432,7 +5456,7 @@ return {
full_name = 'modified',
no_mkrc = true,
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('buffer has been modified'),
type = 'boolean',
varname = 'p_mod',
@@ -5708,13 +5732,13 @@ return {
indicate no input when the hit-enter prompt is displayed (since
clicking the mouse has no effect in this state.)
]=],
- enable_if = false,
full_name = 'mouseshape',
list = 'onecomma',
scope = { 'global' },
short_desc = N_('shape of the mouse pointer in different modes'),
tags = { 'E547' },
type = 'string',
+ immutable = true,
},
{
abbreviation = 'mouset',
@@ -5730,8 +5754,20 @@ return {
varname = 'p_mouset',
},
{
+ abbreviation = 'mhi',
+ defaults = { if_true = 500 },
+ desc = [=[
+ Determines how many entries are remembered in the |:messages| history.
+ The maximum value is 10000.
+ ]=],
+ full_name = 'msghistory',
+ scope = { 'global' },
+ short_desc = N_('how many messages are remembered'),
+ type = 'number',
+ varname = 'p_mhi',
+ },
+ {
abbreviation = 'nf',
- alloced = true,
cb = 'did_set_nrformats',
defaults = { if_true = 'bin,hex' },
deny_duplicates = true,
@@ -5780,7 +5816,7 @@ return {
expand_cb = 'expand_set_nrformats',
full_name = 'nrformats',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('number formats recognized for CTRL-A command'),
type = 'string',
varname = 'p_nf',
@@ -5814,7 +5850,7 @@ return {
]=],
full_name = 'number',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('print the line number in front of each line'),
type = 'boolean',
},
@@ -5836,13 +5872,12 @@ return {
]=],
full_name = 'numberwidth',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('number of columns used for the line number'),
type = 'number',
},
{
abbreviation = 'ofu',
- alloced = true,
cb = 'did_set_omnifunc',
defaults = { if_true = '' },
desc = [=[
@@ -5859,7 +5894,7 @@ return {
]=],
full_name = 'omnifunc',
func = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
secure = true,
short_desc = N_('function for filetype-specific completion'),
type = 'string',
@@ -5876,11 +5911,11 @@ return {
Note that on Windows editing "aux.h", "lpt1.txt" and the like also
result in editing a device.
]=],
- enable_if = false,
full_name = 'opendevice',
scope = { 'global' },
short_desc = N_('allow reading/writing devices on MS-Windows'),
type = 'boolean',
+ immutable = true,
},
{
abbreviation = 'opfunc',
@@ -5953,11 +5988,11 @@ return {
{
abbreviation = 'pt',
defaults = { if_true = '' },
- enable_if = false,
full_name = 'pastetoggle',
scope = { 'global' },
short_desc = N_('No description'),
type = 'string',
+ immutable = true,
},
{
abbreviation = 'pex',
@@ -6062,7 +6097,7 @@ return {
expand = true,
full_name = 'path',
list = 'comma',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('list of directories searched with "gf" et.al.'),
tags = { 'E343', 'E345', 'E347', 'E854' },
type = 'string',
@@ -6086,7 +6121,7 @@ return {
Use |:retab| to clean up white space.
]=],
full_name = 'preserveindent',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('preserve the indent structure when reindenting'),
type = 'boolean',
varname = 'p_pi',
@@ -6116,7 +6151,7 @@ return {
full_name = 'previewwindow',
noglob = true,
redraw = { 'statuslines' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('identifies the preview window'),
tags = { 'E590' },
type = 'boolean',
@@ -6226,7 +6261,6 @@ return {
},
{
abbreviation = 'qe',
- alloced = true,
defaults = { if_true = '\\' },
desc = [=[
The characters that are used to escape quotes in a string. Used for
@@ -6236,7 +6270,7 @@ return {
text "foo\"bar\\" considered to be one string.
]=],
full_name = 'quoteescape',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('escape characters used in a string'),
type = 'string',
varname = 'p_qe',
@@ -6258,7 +6292,7 @@ return {
full_name = 'readonly',
noglob = true,
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('disallow writing the buffer'),
type = 'boolean',
varname = 'p_ro',
@@ -6374,7 +6408,7 @@ return {
]=],
full_name = 'relativenumber',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('show relative line number in front of each line'),
type = 'boolean',
},
@@ -6431,13 +6465,12 @@ return {
]=],
full_name = 'rightleft',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('window is right-to-left oriented'),
type = 'boolean',
},
{
abbreviation = 'rlc',
- alloced = true,
cb = 'did_set_rightleftcmd',
defaults = { if_true = 'search' },
desc = [=[
@@ -6452,7 +6485,7 @@ return {
expand_cb = 'expand_set_rightleftcmd',
full_name = 'rightleftcmd',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('commands for which editing works right-to-left'),
type = 'string',
},
@@ -6492,7 +6525,6 @@ return {
},
{
abbreviation = 'ruf',
- alloced = true,
cb = 'did_set_rulerformat',
defaults = { if_true = '' },
desc = [=[
@@ -6635,8 +6667,7 @@ return {
]=],
full_name = 'scroll',
no_mkrc = true,
- pv_name = 'p_scroll',
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('lines to scroll with CTRL-U and CTRL-D'),
type = 'number',
},
@@ -6658,7 +6689,7 @@ return {
]=],
full_name = 'scrollback',
redraw = { 'current_buffer' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('lines to scroll with CTRL-U and CTRL-D'),
type = 'number',
varname = 'p_scbk',
@@ -6679,8 +6710,7 @@ return {
with scroll-binding, but ":split file" does not.
]=],
full_name = 'scrollbind',
- pv_name = 'p_scbind',
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('scroll in window as other windows scroll'),
type = 'boolean',
},
@@ -6717,7 +6747,7 @@ return {
< For scrolling horizontally see 'sidescrolloff'.
]=],
full_name = 'scrolloff',
- scope = { 'global', 'window' },
+ scope = { 'global', 'win' },
short_desc = N_('minimum nr. of lines above and below cursor'),
type = 'number',
varname = 'p_so',
@@ -7093,7 +7123,7 @@ return {
*shell-powershell*
To use PowerShell: >vim
let &shell = executable('pwsh') ? 'pwsh' : 'powershell'
- let &shellcmdflag = '-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;'
+ let &shellcmdflag = '-NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';$PSStyle.OutputRendering=''plaintext'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;'
let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode'
let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode'
set shellquote= shellxquote=
@@ -7251,9 +7281,14 @@ return {
{
abbreviation = 'ssl',
cb = 'did_set_shellslash',
- defaults = { if_true = false },
+ defaults = {
+ condition = 'MSWIN',
+ if_true = false,
+ if_false = true,
+ doc = 'on, Windows: off',
+ },
desc = [=[
- only for MS-Windows
+ only modifiable in MS-Windows
When set, a forward slash is used when expanding file names. This is
useful when a Unix-like shell is used instead of cmd.exe. Backward
slashes can still be typed, but they are changed to forward slashes by
@@ -7362,7 +7397,7 @@ return {
function to get the effective shiftwidth value.
]=],
full_name = 'shiftwidth',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('number of spaces to use for (auto)indent step'),
type = 'number',
varname = 'p_sw',
@@ -7460,7 +7495,7 @@ return {
]=],
full_name = 'showbreak',
redraw = { 'all_windows' },
- scope = { 'global', 'window' },
+ scope = { 'global', 'win' },
short_desc = N_('string to use at the start of wrapped lines'),
tags = { 'E595' },
type = 'string',
@@ -7634,14 +7669,13 @@ return {
<
]=],
full_name = 'sidescrolloff',
- scope = { 'global', 'window' },
+ scope = { 'global', 'win' },
short_desc = N_('min. nr. of columns to left and right of cursor'),
type = 'number',
varname = 'p_siso',
},
{
abbreviation = 'scl',
- alloced = true,
cb = 'did_set_signcolumn',
defaults = { if_true = 'auto' },
desc = [=[
@@ -7665,7 +7699,7 @@ return {
expand_cb = 'expand_set_signcolumn',
full_name = 'signcolumn',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('when to display the sign column'),
type = 'string',
},
@@ -7711,7 +7745,7 @@ return {
right.
]=],
full_name = 'smartindent',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('smart autoindenting for C programs'),
type = 'boolean',
varname = 'p_si',
@@ -7751,9 +7785,8 @@ return {
NOTE: partly implemented, doesn't work yet for |gj| and |gk|.
]=],
full_name = 'smoothscroll',
- pv_name = 'p_sms',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_("scroll by screen lines when 'wrap' is set"),
type = 'boolean',
},
@@ -7778,7 +7811,7 @@ return {
to anything other than an empty string.
]=],
full_name = 'softtabstop',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('number of spaces that <Tab> uses while editing'),
type = 'number',
varname = 'p_sts',
@@ -7792,13 +7825,12 @@ return {
]=],
full_name = 'spell',
redraw = { 'current_window', 'highlight_only' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('spell checking'),
type = 'boolean',
},
{
abbreviation = 'spc',
- alloced = true,
cb = 'did_set_spellcapcheck',
defaults = { if_true = '[.?!]\\_[\\])\'"\\t ]\\+' },
desc = [=[
@@ -7814,14 +7846,13 @@ return {
]=],
full_name = 'spellcapcheck',
redraw = { 'current_buffer', 'highlight_only' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('pattern to locate end of a sentence'),
type = 'string',
varname = 'p_spc',
},
{
abbreviation = 'spf',
- alloced = true,
cb = 'did_set_spellfile',
defaults = { if_true = '' },
deny_duplicates = true,
@@ -7851,7 +7882,7 @@ return {
expand = true,
full_name = 'spellfile',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
secure = true,
short_desc = N_('files where |zg| and |zw| store words'),
type = 'string',
@@ -7859,7 +7890,6 @@ return {
},
{
abbreviation = 'spl',
- alloced = true,
cb = 'did_set_spelllang',
defaults = { if_true = 'en' },
deny_duplicates = true,
@@ -7905,7 +7935,7 @@ return {
full_name = 'spelllang',
list = 'onecomma',
redraw = { 'current_buffer', 'highlight_only' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('language(s) to do spell checking for'),
type = 'string',
varname = 'p_spl',
@@ -7930,7 +7960,7 @@ return {
full_name = 'spelloptions',
list = 'onecomma',
redraw = { 'current_buffer', 'highlight_only' },
- scope = { 'buffer' },
+ scope = { 'buf' },
secure = true,
type = 'string',
varname = 'p_spo',
@@ -8093,7 +8123,6 @@ return {
},
{
abbreviation = 'stc',
- alloced = true,
cb = 'did_set_statuscolumn',
defaults = { if_true = '' },
desc = [=[
@@ -8152,14 +8181,13 @@ return {
]=],
full_name = 'statuscolumn',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
secure = true,
short_desc = N_('custom format for the status column'),
type = 'string',
},
{
abbreviation = 'stl',
- alloced = true,
cb = 'did_set_statusline',
defaults = { if_true = '' },
desc = [=[
@@ -8356,7 +8384,7 @@ return {
Examples:
Emulate standard status line with 'ruler' set >vim
- set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
+ set statusline=%<%f\ %h%w%m%r%=%-14.(%l,%c%V%)\ %P
< Similar, but add ASCII value of char under the cursor (like "ga") >vim
set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
< Display byte count and byte value, modified flag in red. >vim
@@ -8377,7 +8405,7 @@ return {
full_name = 'statusline',
modelineexpr = true,
redraw = { 'statuslines' },
- scope = { 'global', 'window' },
+ scope = { 'global', 'win' },
short_desc = N_('custom format for the status line'),
tags = { 'E540', 'E542' },
type = 'string',
@@ -8408,7 +8436,6 @@ return {
},
{
abbreviation = 'sua',
- alloced = true,
defaults = { if_true = '' },
deny_duplicates = true,
desc = [=[
@@ -8419,7 +8446,7 @@ return {
]=],
full_name = 'suffixesadd',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('suffixes added when searching for a file'),
type = 'string',
varname = 'p_sua',
@@ -8450,7 +8477,7 @@ return {
]=],
full_name = 'swapfile',
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('whether to use a swapfile for a buffer'),
type = 'boolean',
varname = 'p_swf',
@@ -8510,14 +8537,13 @@ return {
]=],
full_name = 'synmaxcol',
redraw = { 'current_buffer' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('maximum column to find syntax items'),
type = 'number',
varname = 'p_smc',
},
{
abbreviation = 'syn',
- alloced = true,
cb = 'did_set_filetype_or_syntax',
defaults = { if_true = '' },
desc = [=[
@@ -8548,7 +8574,7 @@ return {
full_name = 'syntax',
noglob = true,
normal_fname_chars = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('syntax to be loaded for current buffer'),
type = 'string',
varname = 'p_syn',
@@ -8671,7 +8697,7 @@ return {
]=],
full_name = 'tabstop',
redraw = { 'current_buffer' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('number of spaces that <Tab> in file uses'),
type = 'number',
varname = 'p_ts',
@@ -8750,7 +8776,7 @@ return {
]=],
expand_cb = 'expand_set_tagcase',
full_name = 'tagcase',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('how to handle case when searching in tags files'),
type = 'string',
varname = 'p_tc',
@@ -8771,7 +8797,7 @@ return {
]=],
full_name = 'tagfunc',
func = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
secure = true,
short_desc = N_('function used to perform tag searches'),
type = 'string',
@@ -8828,7 +8854,7 @@ return {
expand = true,
full_name = 'tags',
list = 'onecomma',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('list of file names used by the tag command'),
tags = { 'E433' },
type = 'string',
@@ -8874,11 +8900,11 @@ return {
{
abbreviation = 'tenc',
defaults = { if_true = '' },
- enable_if = false,
full_name = 'termencoding',
scope = { 'global' },
short_desc = N_('Terminal encoding'),
type = 'string',
+ immutable = true,
},
{
abbreviation = 'tgc',
@@ -8968,7 +8994,7 @@ return {
]=],
full_name = 'textwidth',
redraw = { 'current_buffer', 'highlight_only' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('maximum width of text that is being inserted'),
type = 'number',
varname = 'p_tw',
@@ -8997,14 +9023,13 @@ return {
full_name = 'thesaurus',
list = 'onecomma',
normal_dname_chars = true,
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('list of thesaurus files for keyword completion'),
type = 'string',
varname = 'p_tsr',
},
{
abbreviation = 'tsrfu',
- alloced = true,
cb = 'did_set_thesaurusfunc',
defaults = { if_true = '' },
desc = [=[
@@ -9018,7 +9043,7 @@ return {
]=],
full_name = 'thesaurusfunc',
func = true,
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
secure = true,
short_desc = N_('function used for thesaurus completion'),
type = 'string',
@@ -9129,7 +9154,9 @@ return {
window. This happens only when the 'title' option is on.
When this option contains printf-style '%' items, they will be
- expanded according to the rules used for 'statusline'.
+ expanded according to the rules used for 'statusline'. If it contains
+ an invalid '%' format, the value is used as-is and no error or warning
+ will be given when the value is set.
This option cannot be set in a modeline when 'modelineexpr' is off.
Example: >vim
@@ -9250,7 +9277,7 @@ return {
When 'undofile' is turned off the undo file is NOT deleted.
]=],
full_name = 'undofile',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('save undo information in a file'),
type = 'boolean',
varname = 'p_udf',
@@ -9279,7 +9306,7 @@ return {
Also see |clear-undo|.
]=],
full_name = 'undolevels',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('maximum number of changes that can be undone'),
type = 'number',
varname = 'p_ul',
@@ -9397,7 +9424,8 @@ return {
<
]=],
short_desc=N_("Function used to define behavior of user-defined registers."),
- type='string', scope={'buffer'},
+ type='string',
+ scope={'buf'},
varname='p_urf',
defaults={if_true=""}
},
@@ -9424,7 +9452,7 @@ return {
]=],
full_name = 'varsofttabstop',
list = 'comma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('list of numbers of spaces that <Tab> uses while editing'),
type = 'string',
varname = 'p_vsts',
@@ -9447,7 +9475,7 @@ return {
full_name = 'vartabstop',
list = 'comma',
redraw = { 'current_buffer' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('list of numbers of spaces that <Tab> in file uses'),
type = 'string',
varname = 'p_vts',
@@ -9593,7 +9621,7 @@ return {
full_name = 'virtualedit',
list = 'onecomma',
redraw = { 'curswant' },
- scope = { 'global', 'window' },
+ scope = { 'global', 'win' },
short_desc = N_('when to use virtual editing'),
type = 'string',
varname = 'p_ve',
@@ -9666,7 +9694,7 @@ return {
abbreviation = 'wc',
cb = 'did_set_wildchar',
defaults = {
- if_true = imacros('TAB'),
+ if_true = macros('TAB', 'number'),
doc = '<Tab>',
},
desc = [=[
@@ -9920,7 +9948,6 @@ return {
},
{
abbreviation = 'wbr',
- alloced = true,
cb = 'did_set_winbar',
defaults = { if_true = '' },
desc = [=[
@@ -9941,7 +9968,7 @@ return {
full_name = 'winbar',
modelineexpr = true,
redraw = { 'statuslines' },
- scope = { 'global', 'window' },
+ scope = { 'global', 'win' },
short_desc = N_('custom format for the window bar'),
type = 'string',
varname = 'p_wbr',
@@ -9959,7 +9986,7 @@ return {
]=],
full_name = 'winblend',
redraw = { 'current_window', 'highlight_only' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('Controls transparency level for floating windows'),
type = 'number',
},
@@ -9998,8 +10025,7 @@ return {
command has a "!" modifier, it can force switching buffers.
]=],
full_name = 'winfixbuf',
- pv_name = 'p_wfb',
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('pin a window to a specific buffer'),
type = 'boolean',
},
@@ -10014,7 +10040,7 @@ return {
]=],
full_name = 'winfixheight',
redraw = { 'statuslines' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('keep window height when opening/closing windows'),
type = 'boolean',
},
@@ -10028,7 +10054,7 @@ return {
]=],
full_name = 'winfixwidth',
redraw = { 'statuslines' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('keep window width when opening/closing windows'),
type = 'boolean',
},
@@ -10063,7 +10089,6 @@ return {
},
{
abbreviation = 'winhl',
- alloced = true,
cb = 'did_set_winhighlight',
defaults = { if_true = '' },
deny_duplicates = true,
@@ -10090,7 +10115,7 @@ return {
full_name = 'winhighlight',
list = 'onecommacolon',
redraw = { 'current_window', 'highlight_only' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('Setup window-local highlights'),
type = 'string',
},
@@ -10181,7 +10206,7 @@ return {
]=],
full_name = 'wrap',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('lines wrap and continue on the next line'),
type = 'boolean',
},
@@ -10198,7 +10223,7 @@ return {
See also 'formatoptions' and |ins-textwidth|.
]=],
full_name = 'wrapmargin',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('chars from the right where wrapping starts'),
type = 'number',
varname = 'p_wm',