vvars.lua 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785
  1. --- @meta _
  2. -- THIS FILE IS GENERATED
  3. -- DO NOT EDIT
  4. error('Cannot require a meta file')
  5. --- @class vim.v
  6. vim.v = ...
  7. --- The command line arguments Vim was invoked with. This is a
  8. --- list of strings. The first item is the Vim command.
  9. --- See `v:progpath` for the command with full path.
  10. --- @type string[]
  11. vim.v.argv = ...
  12. --- Argument for evaluating 'formatexpr' and used for the typed
  13. --- character when using <expr> in an abbreviation `:map-<expr>`.
  14. --- It is also used by the `InsertCharPre` and `InsertEnter` events.
  15. --- @type string
  16. vim.v.char = ...
  17. --- The name of the character encoding of a file to be converted.
  18. --- Only valid while evaluating the 'charconvert' option.
  19. --- @type string
  20. vim.v.charconvert_from = ...
  21. --- The name of the character encoding of a file after conversion.
  22. --- Only valid while evaluating the 'charconvert' option.
  23. --- @type string
  24. vim.v.charconvert_to = ...
  25. --- The extra arguments ("++p", "++enc=", "++ff=") given to a file
  26. --- read/write command. This is set before an autocommand event
  27. --- for a file read/write command is triggered. There is a
  28. --- leading space to make it possible to append this variable
  29. --- directly after the read/write command. Note: "+cmd" isn't
  30. --- included here, because it will be executed anyway.
  31. --- @type string
  32. vim.v.cmdarg = ...
  33. --- Set like v:cmdarg for a file read/write command. When a "!"
  34. --- was used the value is 1, otherwise it is 0. Note that this
  35. --- can only be used in autocommands. For user commands `<bang>`
  36. --- can be used.
  37. --- @type integer
  38. vim.v.cmdbang = ...
  39. --- The current locale setting for collation order of the runtime
  40. --- environment. This allows Vim scripts to be aware of the
  41. --- current locale encoding. Technical: it's the value of
  42. --- LC_COLLATE. When not using a locale the value is "C".
  43. --- This variable can not be set directly, use the `:language`
  44. --- command.
  45. --- See `multi-lang`.
  46. --- @type string
  47. vim.v.collate = ...
  48. --- Dictionary containing the `complete-items` for the most
  49. --- recently completed word after `CompleteDone`. Empty if the
  50. --- completion failed, or after leaving and re-entering insert
  51. --- mode.
  52. --- Note: Plugins can modify the value to emulate the builtin
  53. --- `CompleteDone` event behavior.
  54. --- @type vim.v.completed_item
  55. vim.v.completed_item = ...
  56. --- The count given for the last Normal mode command. Can be used
  57. --- to get the count before a mapping. Read-only. Example:
  58. ---
  59. --- ```vim
  60. --- :map _x :<C-U>echo "the count is " .. v:count<CR>
  61. --- ```
  62. ---
  63. --- Note: The <C-U> is required to remove the line range that you
  64. --- get when typing ':' after a count.
  65. --- When there are two counts, as in "3d2w", they are multiplied,
  66. --- just like what happens in the command, "d6w" for the example.
  67. --- Also used for evaluating the 'formatexpr' option.
  68. --- @type integer
  69. vim.v.count = ...
  70. --- Just like "v:count", but defaults to one when no count is
  71. --- used.
  72. --- @type integer
  73. vim.v.count1 = ...
  74. --- The current locale setting for characters of the runtime
  75. --- environment. This allows Vim scripts to be aware of the
  76. --- current locale encoding. Technical: it's the value of
  77. --- LC_CTYPE. When not using a locale the value is "C".
  78. --- This variable can not be set directly, use the `:language`
  79. --- command.
  80. --- See `multi-lang`.
  81. --- @type string
  82. vim.v.ctype = ...
  83. --- Normally zero. When a deadly signal is caught it's set to
  84. --- one. When multiple signals are caught the number increases.
  85. --- Can be used in an autocommand to check if Vim didn't
  86. --- terminate normally.
  87. --- Example:
  88. ---
  89. --- ```vim
  90. --- :au VimLeave * if v:dying | echo "\nAAAAaaaarrrggghhhh!!!\n" | endif
  91. --- ```
  92. ---
  93. --- Note: if another deadly signal is caught when v:dying is one,
  94. --- VimLeave autocommands will not be executed.
  95. --- @type integer
  96. vim.v.dying = ...
  97. --- Number of screen cells that can be used for an `:echo` message
  98. --- in the last screen line before causing the `hit-enter-prompt`.
  99. --- Depends on 'showcmd', 'ruler' and 'columns'. You need to
  100. --- check 'cmdheight' for whether there are full-width lines
  101. --- available above the last line.
  102. --- @type integer
  103. vim.v.echospace = ...
  104. --- Last given error message.
  105. --- Modifiable (can be set).
  106. --- Example:
  107. ---
  108. --- ```vim
  109. --- let v:errmsg = ""
  110. --- silent! next
  111. --- if v:errmsg != ""
  112. --- " ... handle error
  113. --- ```
  114. --- @type string
  115. vim.v.errmsg = ...
  116. --- Errors found by assert functions, such as `assert_true()`.
  117. --- This is a list of strings.
  118. --- The assert functions append an item when an assert fails.
  119. --- The return value indicates this: a one is returned if an item
  120. --- was added to v:errors, otherwise zero is returned.
  121. --- To remove old results make it empty:
  122. ---
  123. --- ```vim
  124. --- let v:errors = []
  125. --- ```
  126. ---
  127. --- If v:errors is set to anything but a list it is made an empty
  128. --- list by the assert function.
  129. --- @type string[]
  130. vim.v.errors = ...
  131. --- Dictionary of event data for the current `autocommand`. Valid
  132. --- only during the event lifetime; storing or passing v:event is
  133. --- invalid! Copy it instead:
  134. ---
  135. --- ```vim
  136. --- au TextYankPost * let g:foo = deepcopy(v:event)
  137. --- ```
  138. ---
  139. --- Keys vary by event; see the documentation for the specific
  140. --- event, e.g. `DirChanged` or `TextYankPost`.
  141. --- KEY DESCRIPTION ~
  142. --- abort Whether the event triggered during
  143. --- an aborting condition (e.g. `c_Esc` or
  144. --- `c_CTRL-C` for `CmdlineLeave`).
  145. --- chan `channel-id`
  146. --- info Dict of arbitrary event data.
  147. --- cmdlevel Level of cmdline.
  148. --- cmdtype Type of cmdline, `cmdline-char`.
  149. --- cwd Current working directory.
  150. --- inclusive Motion is `inclusive`, else exclusive.
  151. --- scope Event-specific scope name.
  152. --- operator Current `operator`. Also set for Ex
  153. --- commands (unlike `v:operator`). For
  154. --- example if `TextYankPost` is triggered
  155. --- by the `:yank` Ex command then
  156. --- `v:event.operator` is "y".
  157. --- regcontents Text stored in the register as a
  158. --- `readfile()`-style list of lines.
  159. --- regname Requested register (e.g "x" for "xyy)
  160. --- or the empty string for an unnamed
  161. --- operation.
  162. --- regtype Type of register as returned by
  163. --- `getregtype()`.
  164. --- visual Selection is visual (as opposed to,
  165. --- e.g., via motion).
  166. --- completed_item Current selected complete item on
  167. --- `CompleteChanged`, Is `{}` when no complete
  168. --- item selected.
  169. --- height Height of popup menu on `CompleteChanged`
  170. --- width Width of popup menu on `CompleteChanged`
  171. --- row Row count of popup menu on `CompleteChanged`,
  172. --- relative to screen.
  173. --- col Col count of popup menu on `CompleteChanged`,
  174. --- relative to screen.
  175. --- size Total number of completion items on
  176. --- `CompleteChanged`.
  177. --- scrollbar Is `v:true` if popup menu have scrollbar, or
  178. --- `v:false` if not.
  179. --- changed_window Is `v:true` if the event fired while
  180. --- changing window (or tab) on `DirChanged`.
  181. --- status Job status or exit code, -1 means "unknown". `TermClose`
  182. --- reason Reason for completion being done. `CompleteDone`
  183. --- complete_word The word that was selected, empty if abandoned complete.
  184. --- complete_type See `complete_info_mode`
  185. --- @type vim.v.event
  186. vim.v.event = ...
  187. --- The value of the exception most recently caught and not
  188. --- finished. See also `v:throwpoint` and `throw-variables`.
  189. --- Example:
  190. ---
  191. --- ```vim
  192. --- try
  193. --- throw "oops"
  194. --- catch /.*/
  195. --- echo "caught " .. v:exception
  196. --- endtry
  197. --- ```
  198. ---
  199. --- Output: "caught oops".
  200. --- @type string
  201. vim.v.exception = ...
  202. --- Exit code, or `v:null` before invoking the `VimLeavePre`
  203. --- and `VimLeave` autocmds. See `:q`, `:x` and `:cquit`.
  204. --- Example:
  205. ---
  206. --- ```vim
  207. --- :au VimLeave * echo "Exit value is " .. v:exiting
  208. --- ```
  209. --- @type integer?
  210. vim.v.exiting = ...
  211. --- Special value used to put "false" in JSON and msgpack. See
  212. --- `json_encode()`. This value is converted to "v:false" when used
  213. --- as a String (e.g. in `expr5` with string concatenation
  214. --- operator) and to zero when used as a Number (e.g. in `expr5`
  215. --- or `expr7` when used with numeric operators). Read-only.
  216. --- @type boolean
  217. vim.v['false'] = ...
  218. --- What should happen after a `FileChangedShell` event was
  219. --- triggered. Can be used in an autocommand to tell Vim what to
  220. --- do with the affected buffer:
  221. --- reload Reload the buffer (does not work if
  222. --- the file was deleted).
  223. --- edit Reload the buffer and detect the
  224. --- values for options such as
  225. --- 'fileformat', 'fileencoding', 'binary'
  226. --- (does not work if the file was
  227. --- deleted).
  228. --- ask Ask the user what to do, as if there
  229. --- was no autocommand. Except that when
  230. --- only the timestamp changed nothing
  231. --- will happen.
  232. --- <empty> Nothing, the autocommand should do
  233. --- everything that needs to be done.
  234. --- The default is empty. If another (invalid) value is used then
  235. --- Vim behaves like it is empty, there is no warning message.
  236. --- @type string
  237. vim.v.fcs_choice = ...
  238. --- The reason why the `FileChangedShell` event was triggered.
  239. --- Can be used in an autocommand to decide what to do and/or what
  240. --- to set v:fcs_choice to. Possible values:
  241. --- deleted file no longer exists
  242. --- conflict file contents, mode or timestamp was
  243. --- changed and buffer is modified
  244. --- changed file contents has changed
  245. --- mode mode of file changed
  246. --- time only file timestamp changed
  247. --- @type string
  248. vim.v.fcs_reason = ...
  249. --- When evaluating 'includeexpr': the file name that was
  250. --- detected. Empty otherwise.
  251. --- @type string
  252. vim.v.fname = ...
  253. --- The name of the diff (patch) file. Only valid while
  254. --- evaluating 'patchexpr'.
  255. --- @type string
  256. vim.v.fname_diff = ...
  257. --- The name of the input file. Valid while evaluating:
  258. --- option used for ~
  259. --- 'charconvert' file to be converted
  260. --- 'diffexpr' original file
  261. --- 'patchexpr' original file
  262. --- And set to the swap file name for `SwapExists`.
  263. --- @type string
  264. vim.v.fname_in = ...
  265. --- The name of the new version of the file. Only valid while
  266. --- evaluating 'diffexpr'.
  267. --- @type string
  268. vim.v.fname_new = ...
  269. --- The name of the output file. Only valid while
  270. --- evaluating:
  271. --- option used for ~
  272. --- 'charconvert' resulting converted file [1]
  273. --- 'diffexpr' output of diff
  274. --- 'patchexpr' resulting patched file
  275. --- [1] When doing conversion for a write command (e.g., ":w
  276. --- file") it will be equal to v:fname_in. When doing conversion
  277. --- for a read command (e.g., ":e file") it will be a temporary
  278. --- file and different from v:fname_in.
  279. --- @type string
  280. vim.v.fname_out = ...
  281. --- Used for 'foldtext': dashes representing foldlevel of a closed
  282. --- fold.
  283. --- Read-only in the `sandbox`. `fold-foldtext`
  284. --- @type string
  285. vim.v.folddashes = ...
  286. --- Used for 'foldtext': last line of closed fold.
  287. --- Read-only in the `sandbox`. `fold-foldtext`
  288. --- @type integer
  289. vim.v.foldend = ...
  290. --- Used for 'foldtext': foldlevel of closed fold.
  291. --- Read-only in the `sandbox`. `fold-foldtext`
  292. --- @type integer
  293. vim.v.foldlevel = ...
  294. --- Used for 'foldtext': first line of closed fold.
  295. --- Read-only in the `sandbox`. `fold-foldtext`
  296. --- @type integer
  297. vim.v.foldstart = ...
  298. --- Variable that indicates whether search highlighting is on.
  299. --- Setting it makes sense only if 'hlsearch' is enabled. Setting
  300. --- this variable to zero acts like the `:nohlsearch` command,
  301. --- setting it to one acts like
  302. ---
  303. --- ```vim
  304. --- let &hlsearch = &hlsearch
  305. --- ```
  306. ---
  307. --- Note that the value is restored when returning from a
  308. --- function. `function-search-undo`.
  309. --- @type integer
  310. vim.v.hlsearch = ...
  311. --- Used for the `InsertEnter` and `InsertChange` autocommand
  312. --- events. Values:
  313. --- i Insert mode
  314. --- r Replace mode
  315. --- v Virtual Replace mode
  316. --- @type string
  317. vim.v.insertmode = ...
  318. --- Key of the current item of a `Dictionary`. Only valid while
  319. --- evaluating the expression used with `map()` and `filter()`.
  320. --- Read-only.
  321. --- @type string
  322. vim.v.key = ...
  323. --- The current locale setting for messages of the runtime
  324. --- environment. This allows Vim scripts to be aware of the
  325. --- current language. Technical: it's the value of LC_MESSAGES.
  326. --- The value is system dependent.
  327. --- This variable can not be set directly, use the `:language`
  328. --- command.
  329. --- It can be different from `v:ctype` when messages are desired
  330. --- in a different language than what is used for character
  331. --- encoding. See `multi-lang`.
  332. --- @type string
  333. vim.v.lang = ...
  334. --- The current locale setting for time messages of the runtime
  335. --- environment. This allows Vim scripts to be aware of the
  336. --- current language. Technical: it's the value of LC_TIME.
  337. --- This variable can not be set directly, use the `:language`
  338. --- command. See `multi-lang`.
  339. --- @type string
  340. vim.v.lc_time = ...
  341. --- Line number for the 'foldexpr' `fold-expr`, 'formatexpr',
  342. --- 'indentexpr' and 'statuscolumn' expressions, tab page number
  343. --- for 'guitablabel' and 'guitabtooltip'. Only valid while one of
  344. --- these expressions is being evaluated. Read-only when in the
  345. --- `sandbox`.
  346. --- @type integer
  347. vim.v.lnum = ...
  348. --- Prefix for calling Lua functions from expressions.
  349. --- See `v:lua-call` for more information.
  350. --- @type any
  351. vim.v.lua = ...
  352. --- Maximum line length. Depending on where it is used it can be
  353. --- screen columns, characters or bytes. The value currently is
  354. --- 2147483647 on all systems.
  355. --- @type integer
  356. vim.v.maxcol = ...
  357. --- Column number for a mouse click obtained with `getchar()`.
  358. --- This is the screen column number, like with `virtcol()`. The
  359. --- value is zero when there was no mouse button click.
  360. --- @type integer
  361. vim.v.mouse_col = ...
  362. --- Line number for a mouse click obtained with `getchar()`.
  363. --- This is the text line number, not the screen line number. The
  364. --- value is zero when there was no mouse button click.
  365. --- @type integer
  366. vim.v.mouse_lnum = ...
  367. --- Window number for a mouse click obtained with `getchar()`.
  368. --- First window has number 1, like with `winnr()`. The value is
  369. --- zero when there was no mouse button click.
  370. --- @type integer
  371. vim.v.mouse_win = ...
  372. --- `window-ID` for a mouse click obtained with `getchar()`.
  373. --- The value is zero when there was no mouse button click.
  374. --- @type integer
  375. vim.v.mouse_winid = ...
  376. --- Dictionary containing msgpack types used by `msgpackparse()`
  377. --- and `msgpackdump()`. All types inside dictionary are fixed
  378. --- (not editable) empty lists. To check whether some list is one
  379. --- of msgpack types, use `is` operator.
  380. --- @type table
  381. vim.v.msgpack_types = ...
  382. --- Special value used to put "null" in JSON and NIL in msgpack.
  383. --- See `json_encode()`. This value is converted to "v:null" when
  384. --- used as a String (e.g. in `expr5` with string concatenation
  385. --- operator) and to zero when used as a Number (e.g. in `expr5`
  386. --- or `expr7` when used with numeric operators). Read-only.
  387. --- In some places `v:null` can be used for a List, Dict, etc.
  388. --- that is not set. That is slightly different than an empty
  389. --- List, Dict, etc.
  390. --- @type vim.NIL
  391. vim.v.null = ...
  392. --- Maximum value of a number.
  393. --- @type integer
  394. vim.v.numbermax = ...
  395. --- Minimum value of a number (negative).
  396. --- @type integer
  397. vim.v.numbermin = ...
  398. --- Number of bits in a Number. This is normally 64, but on some
  399. --- systems it may be 32.
  400. --- @type integer
  401. vim.v.numbersize = ...
  402. --- List of file names that is loaded from the `shada` file on
  403. --- startup. These are the files that Vim remembers marks for.
  404. --- The length of the List is limited by the ' argument of the
  405. --- 'shada' option (default is 100).
  406. --- When the `shada` file is not used the List is empty.
  407. --- Also see `:oldfiles` and `c_#<`.
  408. --- The List can be modified, but this has no effect on what is
  409. --- stored in the `shada` file later. If you use values other
  410. --- than String this will cause trouble.
  411. --- @type string[]
  412. vim.v.oldfiles = ...
  413. --- The last operator given in Normal mode. This is a single
  414. --- character except for commands starting with <g> or <z>,
  415. --- in which case it is two characters. Best used alongside
  416. --- `v:prevcount` and `v:register`. Useful if you want to cancel
  417. --- Operator-pending mode and then use the operator, e.g.:
  418. ---
  419. --- ```vim
  420. --- :omap O <Esc>:call MyMotion(v:operator)<CR>
  421. --- ```
  422. ---
  423. --- The value remains set until another operator is entered, thus
  424. --- don't expect it to be empty.
  425. --- v:operator is not set for `:delete`, `:yank` or other Ex
  426. --- commands.
  427. --- Read-only.
  428. --- @type string
  429. vim.v.operator = ...
  430. --- Command used to set the option. Valid while executing an
  431. --- `OptionSet` autocommand.
  432. --- value option was set via ~
  433. --- "setlocal" `:setlocal` or `:let l:xxx`
  434. --- "setglobal" `:setglobal` or `:let g:xxx`
  435. --- "set" `:set` or `:let`
  436. --- "modeline" `modeline`
  437. --- @type string
  438. vim.v.option_command = ...
  439. --- New value of the option. Valid while executing an `OptionSet`
  440. --- autocommand.
  441. --- @type any
  442. vim.v.option_new = ...
  443. --- Old value of the option. Valid while executing an `OptionSet`
  444. --- autocommand. Depending on the command used for setting and the
  445. --- kind of option this is either the local old value or the
  446. --- global old value.
  447. --- @type any
  448. vim.v.option_old = ...
  449. --- Old global value of the option. Valid while executing an
  450. --- `OptionSet` autocommand.
  451. --- @type any
  452. vim.v.option_oldglobal = ...
  453. --- Old local value of the option. Valid while executing an
  454. --- `OptionSet` autocommand.
  455. --- @type any
  456. vim.v.option_oldlocal = ...
  457. --- Scope of the set command. Valid while executing an
  458. --- `OptionSet` autocommand. Can be either "global" or "local"
  459. --- @type string
  460. vim.v.option_type = ...
  461. --- The count given for the last but one Normal mode command.
  462. --- This is the v:count value of the previous command. Useful if
  463. --- you want to cancel Visual or Operator-pending mode and then
  464. --- use the count, e.g.:
  465. ---
  466. --- ```vim
  467. --- :vmap % <Esc>:call MyFilter(v:prevcount)<CR>
  468. --- ```
  469. ---
  470. --- Read-only.
  471. --- @type integer
  472. vim.v.prevcount = ...
  473. --- Normally zero. Set to one after using ":profile start".
  474. --- See `profiling`.
  475. --- @type integer
  476. vim.v.profiling = ...
  477. --- The name by which Nvim was invoked (with path removed).
  478. --- Read-only.
  479. --- @type string
  480. vim.v.progname = ...
  481. --- Absolute path to the current running Nvim.
  482. --- Read-only.
  483. --- @type string
  484. vim.v.progpath = ...
  485. --- The name of the register in effect for the current normal mode
  486. --- command (regardless of whether that command actually used a
  487. --- register). Or for the currently executing normal mode mapping
  488. --- (use this in custom commands that take a register).
  489. --- If none is supplied it is the default register '"', unless
  490. --- 'clipboard' contains "unnamed" or "unnamedplus", then it is
  491. --- "*" or '+'.
  492. --- Also see `getreg()` and `setreg()`
  493. --- @type string
  494. vim.v.register = ...
  495. --- Relative line number for the 'statuscolumn' expression.
  496. --- Read-only.
  497. --- @type integer
  498. vim.v.relnum = ...
  499. --- String describing the script or function that caused the
  500. --- screen to scroll up. It's only set when it is empty, thus the
  501. --- first reason is remembered. It is set to "Unknown" for a
  502. --- typed command.
  503. --- This can be used to find out why your script causes the
  504. --- hit-enter prompt.
  505. --- @type string
  506. vim.v.scrollstart = ...
  507. --- Search direction: 1 after a forward search, 0 after a
  508. --- backward search. It is reset to forward when directly setting
  509. --- the last search pattern, see `quote/`.
  510. --- Note that the value is restored when returning from a
  511. --- function. `function-search-undo`.
  512. --- Read-write.
  513. --- @type integer
  514. vim.v.searchforward = ...
  515. --- Primary listen-address of Nvim, the first item returned by
  516. --- `serverlist()`. Usually this is the named pipe created by Nvim
  517. --- at `startup` or given by `--listen` (or the deprecated
  518. --- `$NVIM_LISTEN_ADDRESS` env var).
  519. ---
  520. --- See also `serverstart()` `serverstop()`.
  521. --- Read-only.
  522. ---
  523. --- *$NVIM*
  524. --- $NVIM is set by `terminal` and `jobstart()`, and is thus
  525. --- a hint that the current environment is a subprocess of Nvim.
  526. --- Example:
  527. ---
  528. --- ```vim
  529. --- if $NVIM
  530. --- echo nvim_get_chan_info(v:parent)
  531. --- endif
  532. --- ```
  533. ---
  534. --- Note the contents of $NVIM may change in the future.
  535. --- @type string
  536. vim.v.servername = ...
  537. --- Result of the last shell command. When non-zero, the last
  538. --- shell command had an error. When zero, there was no problem.
  539. --- This only works when the shell returns the error code to Vim.
  540. --- The value -1 is often used when the command could not be
  541. --- executed. Read-only.
  542. --- Example:
  543. ---
  544. --- ```vim
  545. --- !mv foo bar
  546. --- if v:shell_error
  547. --- echo 'could not rename "foo" to "bar"!'
  548. --- endif
  549. --- ```
  550. --- @type integer
  551. vim.v.shell_error = ...
  552. --- Last given status message.
  553. --- Modifiable (can be set).
  554. --- @type string
  555. vim.v.statusmsg = ...
  556. --- `channel-id` corresponding to stderr. The value is always 2;
  557. --- use this variable to make your code more descriptive.
  558. --- Unlike stdin and stdout (see `stdioopen()`), stderr is always
  559. --- open for writing. Example:
  560. ---
  561. --- ```vim
  562. --- :call chansend(v:stderr, "error: toaster empty\n")
  563. --- ```
  564. --- @type integer
  565. vim.v.stderr = ...
  566. --- `SwapExists` autocommands can set this to the selected choice
  567. --- for handling an existing swapfile:
  568. --- 'o' Open read-only
  569. --- 'e' Edit anyway
  570. --- 'r' Recover
  571. --- 'd' Delete swapfile
  572. --- 'q' Quit
  573. --- 'a' Abort
  574. --- The value should be a single-character string. An empty value
  575. --- results in the user being asked, as would happen when there is
  576. --- no SwapExists autocommand. The default is empty.
  577. --- @type string
  578. vim.v.swapchoice = ...
  579. --- Normal mode command to be executed after a file has been
  580. --- opened. Can be used for a `SwapExists` autocommand to have
  581. --- another Vim open the file and jump to the right place. For
  582. --- example, when jumping to a tag the value is ":tag tagname\r".
  583. --- For ":edit +cmd file" the value is ":cmd\r".
  584. --- @type string
  585. vim.v.swapcommand = ...
  586. --- Name of the swapfile found.
  587. --- Only valid during `SwapExists` event.
  588. --- Read-only.
  589. --- @type string
  590. vim.v.swapname = ...
  591. --- Value of `Blob` type. Read-only. See: `type()`
  592. --- @type integer
  593. vim.v.t_blob = ...
  594. --- Value of `Boolean` type. Read-only. See: `type()`
  595. --- @type integer
  596. vim.v.t_bool = ...
  597. --- Value of `Dictionary` type. Read-only. See: `type()`
  598. --- @type integer
  599. vim.v.t_dict = ...
  600. --- Value of `Float` type. Read-only. See: `type()`
  601. --- @type integer
  602. vim.v.t_float = ...
  603. --- Value of `Funcref` type. Read-only. See: `type()`
  604. --- @type integer
  605. vim.v.t_func = ...
  606. --- Value of `List` type. Read-only. See: `type()`
  607. --- @type integer
  608. vim.v.t_list = ...
  609. --- Value of `Number` type. Read-only. See: `type()`
  610. --- @type integer
  611. vim.v.t_number = ...
  612. --- Value of `String` type. Read-only. See: `type()`
  613. --- @type integer
  614. vim.v.t_string = ...
  615. --- The value of the most recent OSC or DCS control sequence
  616. --- sent from a process running in the embedded `terminal`.
  617. --- This can be read in a `TermRequest` event handler to respond
  618. --- to queries from embedded applications.
  619. --- @type string
  620. vim.v.termrequest = ...
  621. --- The value of the most recent OSC or DCS control sequence
  622. --- received by Nvim from the terminal. This can be read in a
  623. --- `TermResponse` event handler after querying the terminal using
  624. --- another escape sequence.
  625. --- @type string
  626. vim.v.termresponse = ...
  627. --- Must be set before using `test_garbagecollect_now()`.
  628. --- @type integer
  629. vim.v.testing = ...
  630. --- Full filename of the last loaded or saved session file.
  631. --- Empty when no session file has been saved. See `:mksession`.
  632. --- Modifiable (can be set).
  633. --- @type string
  634. vim.v.this_session = ...
  635. --- The point where the exception most recently caught and not
  636. --- finished was thrown. Not set when commands are typed. See
  637. --- also `v:exception` and `throw-variables`.
  638. --- Example:
  639. ---
  640. --- ```vim
  641. --- try
  642. --- throw "oops"
  643. --- catch /.*/
  644. --- echo "Exception from" v:throwpoint
  645. --- endtry
  646. --- ```
  647. ---
  648. --- Output: "Exception from test.vim, line 2"
  649. --- @type string
  650. vim.v.throwpoint = ...
  651. --- Special value used to put "true" in JSON and msgpack. See
  652. --- `json_encode()`. This value is converted to "v:true" when used
  653. --- as a String (e.g. in `expr5` with string concatenation
  654. --- operator) and to one when used as a Number (e.g. in `expr5` or
  655. --- `expr7` when used with numeric operators). Read-only.
  656. --- @type boolean
  657. vim.v['true'] = ...
  658. --- Value of the current item of a `List` or `Dictionary`. Only
  659. --- valid while evaluating the expression used with `map()` and
  660. --- `filter()`. Read-only.
  661. --- @type any
  662. vim.v.val = ...
  663. --- Vim version number: major version times 100 plus minor
  664. --- version. Vim 5.0 is 500, Vim 5.1 is 501.
  665. --- Read-only.
  666. --- Use `has()` to check the Nvim (not Vim) version:
  667. ---
  668. --- ```vim
  669. --- :if has("nvim-0.2.1")
  670. --- ```
  671. --- @type integer
  672. vim.v.version = ...
  673. --- 0 during startup, 1 just before `VimEnter`.
  674. --- Read-only.
  675. --- @type integer
  676. vim.v.vim_did_enter = ...
  677. --- Virtual line number for the 'statuscolumn' expression.
  678. --- Negative when drawing the status column for virtual lines, zero
  679. --- when drawing an actual buffer line, and positive when drawing
  680. --- the wrapped part of a buffer line.
  681. --- Read-only.
  682. --- @type integer
  683. vim.v.virtnum = ...
  684. --- Last given warning message.
  685. --- Modifiable (can be set).
  686. --- @type string
  687. vim.v.warningmsg = ...
  688. --- Application-specific window "handle" which may be set by any
  689. --- attached UI. Defaults to zero.
  690. --- Note: For Nvim `windows` use `winnr()` or `win_getid()`, see
  691. --- `window-ID`.
  692. --- @type integer
  693. vim.v.windowid = ...