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