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