aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/vvars.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/vvars.lua')
-rw-r--r--src/nvim/vvars.lua261
1 files changed, 131 insertions, 130 deletions
diff --git a/src/nvim/vvars.lua b/src/nvim/vvars.lua
index 2f43f8b32b..5fc014a50c 100644
--- a/src/nvim/vvars.lua
+++ b/src/nvim/vvars.lua
@@ -41,6 +41,15 @@ M.vars = {
included here, because it will be executed anyway.
]=],
},
+ cmdbang = {
+ type = 'integer',
+ desc = [=[
+ Set like v:cmdarg for a file read/write command. When a "!"
+ was used the value is 1, otherwise it is 0. Note that this
+ can only be used in autocommands. For user commands |<bang>|
+ can be used.
+ ]=],
+ },
collate = {
type = 'string',
desc = [=[
@@ -53,15 +62,6 @@ M.vars = {
See |multi-lang|.
]=],
},
- cmdbang = {
- type = 'integer',
- desc = [=[
- Set like v:cmdarg for a file read/write command. When a "!"
- was used the value is 1, otherwise it is 0. Note that this
- can only be used in autocommands. For user commands |<bang>|
- can be used.
- ]=],
- },
completed_item = {
desc = [=[
Dictionary containing the |complete-items| for the most
@@ -118,15 +118,6 @@ M.vars = {
VimLeave autocommands will not be executed.
]=],
},
- exiting = {
- desc = [=[
- Exit code, or |v:null| before invoking the |VimLeavePre|
- and |VimLeave| autocmds. See |:q|, |:x| and |:cquit|.
- Example: >vim
- :au VimLeave * echo "Exit value is " .. v:exiting
- <
- ]=],
- },
echospace = {
type = 'integer',
desc = [=[
@@ -180,13 +171,14 @@ M.vars = {
an aborting condition (e.g. |c_Esc| or
|c_CTRL-C| for |CmdlineLeave|).
chan |channel-id|
+ info Dict of arbitrary event data.
cmdlevel Level of cmdline.
cmdtype Type of cmdline, |cmdline-char|.
cwd Current working directory.
inclusive Motion is |inclusive|, else exclusive.
scope Event-specific scope name.
operator Current |operator|. Also set for Ex
- commands (unlike |v:operator|). For
+ commands (unlike |v:operator|). For
example if |TextYankPost| is triggered
by the |:yank| Ex command then
`v:event.operator` is "y".
@@ -243,18 +235,13 @@ M.vars = {
or |expr7| when used with numeric operators). Read-only.
]=],
},
- fcs_reason = {
- type = 'string',
+ exiting = {
desc = [=[
- The reason why the |FileChangedShell| event was triggered.
- Can be used in an autocommand to decide what to do and/or what
- to set v:fcs_choice to. Possible values:
- deleted file no longer exists
- conflict file contents, mode or timestamp was
- changed and buffer is modified
- changed file contents has changed
- mode mode of file changed
- time only file timestamp changed
+ Exit code, or |v:null| before invoking the |VimLeavePre|
+ and |VimLeave| autocmds. See |:q|, |:x| and |:cquit|.
+ Example: >vim
+ :au VimLeave * echo "Exit value is " .. v:exiting
+ <
]=],
},
fcs_choice = {
@@ -280,6 +267,20 @@ M.vars = {
Vim behaves like it is empty, there is no warning message.
]=],
},
+ fcs_reason = {
+ type = 'string',
+ desc = [=[
+ The reason why the |FileChangedShell| event was triggered.
+ Can be used in an autocommand to decide what to do and/or what
+ to set v:fcs_choice to. Possible values:
+ deleted file no longer exists
+ conflict file contents, mode or timestamp was
+ changed and buffer is modified
+ changed file contents has changed
+ mode mode of file changed
+ time only file timestamp changed
+ ]=],
+ },
fname = {
type = 'string',
desc = [=[
@@ -287,6 +288,13 @@ M.vars = {
detected. Empty otherwise.
]=],
},
+ fname_diff = {
+ type = 'string',
+ desc = [=[
+ The name of the diff (patch) file. Only valid while
+ evaluating 'patchexpr'.
+ ]=],
+ },
fname_in = {
type = 'string',
desc = [=[
@@ -298,6 +306,13 @@ M.vars = {
And set to the swap file name for |SwapExists|.
]=],
},
+ fname_new = {
+ type = 'string',
+ desc = [=[
+ The name of the new version of the file. Only valid while
+ evaluating 'diffexpr'.
+ ]=],
+ },
fname_out = {
type = 'string',
desc = [=[
@@ -313,20 +328,6 @@ M.vars = {
file and different from v:fname_in.
]=],
},
- fname_new = {
- type = 'string',
- desc = [=[
- The name of the new version of the file. Only valid while
- evaluating 'diffexpr'.
- ]=],
- },
- fname_diff = {
- type = 'string',
- desc = [=[
- The name of the diff (patch) file. Only valid while
- evaluating 'patchexpr'.
- ]=],
- },
folddashes = {
type = 'string',
desc = [=[
@@ -335,17 +336,17 @@ M.vars = {
Read-only in the |sandbox|. |fold-foldtext|
]=],
},
- foldlevel = {
+ foldend = {
type = 'integer',
desc = [=[
- Used for 'foldtext': foldlevel of closed fold.
+ Used for 'foldtext': last line of closed fold.
Read-only in the |sandbox|. |fold-foldtext|
]=],
},
- foldend = {
+ foldlevel = {
type = 'integer',
desc = [=[
- Used for 'foldtext': last line of closed fold.
+ Used for 'foldtext': foldlevel of closed fold.
Read-only in the |sandbox|. |fold-foldtext|
]=],
},
@@ -435,19 +436,12 @@ M.vars = {
2147483647 on all systems.
]=],
},
- mouse_win = {
- type = 'integer',
- desc = [=[
- Window number for a mouse click obtained with |getchar()|.
- First window has number 1, like with |winnr()|. The value is
- zero when there was no mouse button click.
- ]=],
- },
- mouse_winid = {
+ mouse_col = {
type = 'integer',
desc = [=[
- |window-ID| for a mouse click obtained with |getchar()|.
- The value is zero when there was no mouse button click.
+ Column number for a mouse click obtained with |getchar()|.
+ This is the screen column number, like with |virtcol()|. The
+ value is zero when there was no mouse button click.
]=],
},
mouse_lnum = {
@@ -458,12 +452,19 @@ M.vars = {
value is zero when there was no mouse button click.
]=],
},
- mouse_col = {
+ mouse_win = {
type = 'integer',
desc = [=[
- Column number for a mouse click obtained with |getchar()|.
- This is the screen column number, like with |virtcol()|. The
- value is zero when there was no mouse button click.
+ Window number for a mouse click obtained with |getchar()|.
+ First window has number 1, like with |winnr()|. The value is
+ zero when there was no mouse button click.
+ ]=],
+ },
+ mouse_winid = {
+ type = 'integer',
+ desc = [=[
+ |window-ID| for a mouse click obtained with |getchar()|.
+ The value is zero when there was no mouse button click.
]=],
},
msgpack_types = {
@@ -516,6 +517,35 @@ M.vars = {
than String this will cause trouble.
]=],
},
+ operator = {
+ type = 'string',
+ desc = [=[
+ The last operator given in Normal mode. This is a single
+ character except for commands starting with <g> or <z>,
+ in which case it is two characters. Best used alongside
+ |v:prevcount| and |v:register|. Useful if you want to cancel
+ Operator-pending mode and then use the operator, e.g.: >vim
+ :omap O <Esc>:call MyMotion(v:operator)<CR>
+ <
+ The value remains set until another operator is entered, thus
+ don't expect it to be empty.
+ v:operator is not set for |:delete|, |:yank| or other Ex
+ commands.
+ Read-only.
+ ]=],
+ },
+ option_command = {
+ type = 'string',
+ desc = [=[
+ Command used to set the option. Valid while executing an
+ |OptionSet| autocommand.
+ value option was set via ~
+ "setlocal" |:setlocal| or `:let l:xxx`
+ "setglobal" |:setglobal| or `:let g:xxx`
+ "set" |:set| or |:let|
+ "modeline" |modeline|
+ ]=],
+ },
option_new = {
desc = [=[
New value of the option. Valid while executing an |OptionSet|
@@ -530,15 +560,15 @@ M.vars = {
global old value.
]=],
},
- option_oldlocal = {
+ option_oldglobal = {
desc = [=[
- Old local value of the option. Valid while executing an
+ Old global value of the option. Valid while executing an
|OptionSet| autocommand.
]=],
},
- option_oldglobal = {
+ option_oldlocal = {
desc = [=[
- Old global value of the option. Valid while executing an
+ Old local value of the option. Valid while executing an
|OptionSet| autocommand.
]=],
},
@@ -549,35 +579,6 @@ M.vars = {
|OptionSet| autocommand. Can be either "global" or "local"
]=],
},
- option_command = {
- type = 'string',
- desc = [=[
- Command used to set the option. Valid while executing an
- |OptionSet| autocommand.
- value option was set via ~
- "setlocal" |:setlocal| or `:let l:xxx`
- "setglobal" |:setglobal| or `:let g:xxx`
- "set" |:set| or |:let|
- "modeline" |modeline|
- ]=],
- },
- operator = {
- type = 'string',
- desc = [=[
- The last operator given in Normal mode. This is a single
- character except for commands starting with <g> or <z>,
- in which case it is two characters. Best used alongside
- |v:prevcount| and |v:register|. Useful if you want to cancel
- Operator-pending mode and then use the operator, e.g.: >vim
- :omap O <Esc>:call MyMotion(v:operator)<CR>
- <
- The value remains set until another operator is entered, thus
- don't expect it to be empty.
- v:operator is not set for |:delete|, |:yank| or other Ex
- commands.
- Read-only.
- ]=],
- },
prevcount = {
type = 'integer',
desc = [=[
@@ -641,6 +642,17 @@ M.vars = {
hit-enter prompt.
]=],
},
+ searchforward = {
+ type = 'integer',
+ desc = [=[
+ Search direction: 1 after a forward search, 0 after a
+ backward search. It is reset to forward when directly setting
+ the last search pattern, see |quote/|.
+ Note that the value is restored when returning from a
+ function. |function-search-undo|.
+ Read-write.
+ ]=],
+ },
servername = {
type = 'string',
desc = [=[
@@ -664,17 +676,6 @@ M.vars = {
Note the contents of $NVIM may change in the future.
]=],
},
- searchforward = {
- type = 'integer',
- desc = [=[
- Search direction: 1 after a forward search, 0 after a
- backward search. It is reset to forward when directly setting
- the last search pattern, see |quote/|.
- Note that the value is restored when returning from a
- function. |function-search-undo|.
- Read-write.
- ]=],
- },
shell_error = {
type = 'integer',
desc = [=[
@@ -709,14 +710,6 @@ M.vars = {
<
]=],
},
- swapname = {
- type = 'string',
- desc = [=[
- Name of the swapfile found.
- Only valid during |SwapExists| event.
- Read-only.
- ]=],
- },
swapchoice = {
type = 'string',
desc = [=[
@@ -743,6 +736,14 @@ M.vars = {
For ":edit +cmd file" the value is ":cmd\r".
]=],
},
+ swapname = {
+ type = 'string',
+ desc = [=[
+ Name of the swapfile found.
+ Only valid during |SwapExists| event.
+ Read-only.
+ ]=],
+ },
t_blob = {
type = 'integer',
tags = { 'v:t_TYPE' },
@@ -776,22 +777,22 @@ M.vars = {
type = 'integer',
desc = 'Value of |String| type. Read-only. See: |type()|',
},
- termresponse = {
+ termrequest = {
type = 'string',
desc = [=[
The value of the most recent OSC or DCS control sequence
- received by Nvim from the terminal. This can be read in a
- |TermResponse| event handler after querying the terminal using
- another escape sequence.
+ sent from a process running in the embedded |terminal|.
+ This can be read in a |TermRequest| event handler to respond
+ to queries from embedded applications.
]=],
},
- termrequest = {
+ termresponse = {
type = 'string',
desc = [=[
The value of the most recent OSC or DCS control sequence
- sent from a process running in the embedded |terminal|.
- This can be read in a |TermRequest| event handler to respond
- to queries from embedded applications.
+ received by Nvim from the terminal. This can be read in a
+ |TermResponse| event handler after querying the terminal using
+ another escape sequence.
]=],
},
testing = {
@@ -849,20 +850,20 @@ M.vars = {
<
]=],
},
- virtnum = {
+ vim_did_enter = {
type = 'integer',
desc = [=[
- Virtual line number for the 'statuscolumn' expression.
- Negative when drawing the status column for virtual lines, zero
- when drawing an actual buffer line, and positive when drawing
- the wrapped part of a buffer line.
+ 0 during startup, 1 just before |VimEnter|.
Read-only.
]=],
},
- vim_did_enter = {
+ virtnum = {
type = 'integer',
desc = [=[
- 0 during startup, 1 just before |VimEnter|.
+ Virtual line number for the 'statuscolumn' expression.
+ Negative when drawing the status column for virtual lines, zero
+ when drawing an actual buffer line, and positive when drawing
+ the wrapped part of a buffer line.
Read-only.
]=],
},