vvars.txt 26 KB

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