Runtime file updates

This commit is contained in:
Bram Moolenaar
2020-06-30 20:38:27 +02:00
parent de8f0f47f6
commit e46a440505
7 changed files with 667 additions and 856 deletions
+57 -41
View File
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2020 Jun 17
*eval.txt* For Vim version 8.2. Last change: 2020 Jun 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -157,7 +157,7 @@ You will not get an error if you try to change the type of a variable.
1.2 Function references ~
*Funcref* *E695* *E718*
*Funcref* *E695* *E718*
A Funcref variable is obtained with the |function()| function, the |funcref()|
function or created with the lambda expression |expr-lambda|. It can be used
in an expression in the place of a function name, before the parenthesis
@@ -2511,13 +2511,15 @@ getjumplist([{winnr} [, {tabnr}]])
List list of jump list items
getline({lnum}) String line {lnum} of current buffer
getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
getloclist({nr} [, {what}]) List list of location list items
getloclist({nr}) List list of location list items
getloclist({nr}, {what}) Dict get specific location list properties
getmarklist([{expr}]) List list of global/local marks
getmatches([{win}]) List list of current matches
getmousepos() Dict last known mouse position
getpid() Number process ID of Vim
getpos({expr}) List position of cursor, mark, etc.
getqflist([{what}]) List list of quickfix items
getqflist() List list of quickfix items
getqflist({what}) Dict get specific quickfix list properties
getreg([{regname} [, 1 [, {list}]]])
String or List contents of a register
getreginfo([{regname}]) Dict information about a register
@@ -2756,12 +2758,15 @@ setcmdpos({pos}) Number set cursor position in command-line
setenv({name}, {val}) none set environment variable
setfperm({fname}, {mode}) Number set {fname} file permissions to {mode}
setline({lnum}, {line}) Number set line {lnum} to {line}
setloclist({nr}, {list} [, {action} [, {what}]])
Number modify location list using {list}
setloclist({nr}, {list} [, {action}])
Number modify location list using {list}
setloclist({nr}, {list}, {action}, {what})
Number modify specific location list props
setmatches({list} [, {win}]) Number restore a list of matches
setpos({expr}, {list}) Number set the {expr} position to {list}
setqflist({list} [, {action} [, {what}]])
Number modify quickfix list using {list}
setqflist({list} [, {action}]) Number modify quickfix list using {list}
setqflist({list}, {action}, {what})
Number modify specific quickfix list props
setreg({n}, {v} [, {opt}]) Number set register to value and type
settabvar({nr}, {varname}, {val}) none set {varname} in tab page {nr} to {val}
settabwinvar({tabnr}, {winnr}, {varname}, {val})
@@ -3635,7 +3640,7 @@ complete_check() *complete_check()*
*complete_info()*
complete_info([{what}])
Returns a Dictionary with information about Insert mode
Returns a |Dictionary| with information about Insert mode
completion. See |ins-completion|.
The items are:
mode Current completion mode name string.
@@ -4862,7 +4867,7 @@ getbufinfo([{dict}])
Without an argument information about all the buffers is
returned.
When the argument is a Dictionary only the buffers matching
When the argument is a |Dictionary| only the buffers matching
the specified criteria are returned. The following keys can
be specified in {dict}:
buflisted include only listed buffers.
@@ -5393,7 +5398,7 @@ getline({lnum} [, {end}])
< To get lines from another buffer see |getbufline()|
getloclist({nr} [, {what}]) *getloclist()*
Returns a list with all the entries in the location list for
Returns a |List| with all the entries in the location list for
window {nr}. {nr} can be the window number or the |window-ID|.
When {nr} is zero the current window is used.
@@ -5415,6 +5420,14 @@ getloclist({nr} [, {what}]) *getloclist()*
|location-list-file-window| for more
details.
Returns an empty Dictionary if there is no location list for
the window {nr} or the window is not present.
Examples (See also |getqflist-examples|): >
:echo getloclist(3, {'all': 0})
:echo getloclist(5, {'filewinid': 0})
getmarklist([{expr}] *getmarklist()*
Without the {expr} argument returns a |List| with information
about all the global marks. |mark|
@@ -5459,7 +5472,7 @@ getmatches([{win}]) *getmatches()*
:unlet m
<
getmousepos() *getmousepos()*
Returns a Dictionary with the last known position of the
Returns a |Dictionary| with the last known position of the
mouse. This can be used in a mapping for a mouse click or in
a filter of a popup window. The items are:
screenrow screen row
@@ -5679,12 +5692,12 @@ getregtype([{regname}]) *getregtype()*
gettabinfo([{arg}]) *gettabinfo()*
If {arg} is not specified, then information about all the tab
pages is returned as a List. Each List item is a Dictionary.
pages is returned as a |List|. Each List item is a |Dictionary|.
Otherwise, {arg} specifies the tab page number and information
about that one is returned. If the tab page does not exist an
empty List is returned.
Each List item is a Dictionary with the following entries:
Each List item is a |Dictionary| with the following entries:
tabnr tab page number.
variables a reference to the dictionary with
tabpage-local variables
@@ -5712,7 +5725,7 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
When {varname} is empty a dictionary with all window-local
variables is returned.
When {varname} is equal to "&" get the values of all
window-local options in a Dictionary.
window-local options in a |Dictionary|.
Otherwise, when {varname} starts with "&" get the value of a
window-local option.
Note that {varname} must be the name without "w:".
@@ -5767,16 +5780,16 @@ gettagstack([{nr}]) *gettagstack()*
GetWinnr()->gettagstack()
getwininfo([{winid}]) *getwininfo()*
Returns information about windows as a List with Dictionaries.
Returns information about windows as a |List| with Dictionaries.
If {winid} is given Information about the window with that ID
is returned, as a List with one item. If the window does not
is returned, as a |List| with one item. If the window does not
exist the result is an empty list.
Without {winid} information about all the windows in all the
tab pages is returned.
Each List item is a Dictionary with the following entries:
Each List item is a |Dictionary| with the following entries:
botline last displayed buffer line
bufnr number of buffer in the window
height window height (excluding winbar)
@@ -5804,7 +5817,7 @@ getwininfo([{winid}]) *getwininfo()*
GetWinnr()->getwininfo()
getwinpos([{timeout}]) *getwinpos()*
The result is a List with two numbers, the result of
The result is a |List| with two numbers, the result of
|getwinposx()| and |getwinposy()| combined:
[x-pos, y-pos]
{timeout} can be used to specify how long to wait in msec for
@@ -5859,7 +5872,7 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()*
'suffixes' affect the ordering of matches.
'wildignorecase' always applies.
When {list} is present and it is |TRUE| the result is a List
When {list} is present and it is |TRUE| the result is a |List|
with all matching files. The advantage of using a List is,
you also get filenames containing newlines correctly.
Otherwise the result is a String and when there are several
@@ -5922,7 +5935,7 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
one of the patterns in 'wildignore' will be skipped and
'suffixes' affect the ordering of matches.
When {list} is present and it is |TRUE| the result is a List
When {list} is present and it is |TRUE| the result is a |List|
with all matching files. The advantage of using a List is, you
also get filenames containing newlines correctly. Otherwise
the result is a String and when there are several matches,
@@ -7281,7 +7294,7 @@ matchstrpos({expr}, {pat} [, {start} [, {count}]]) *matchstrpos()*
*max()*
max({expr}) Return the maximum value of all items in {expr}.
{expr} can be a List or a Dictionary. For a Dictionary,
{expr} can be a |List| or a |Dictionary|. For a Dictionary,
it returns the maximum of all values in the Dictionary.
If {expr} is neither a List nor a Dictionary, or one of the
items in {expr} cannot be used as a Number this results in
@@ -7352,7 +7365,7 @@ menu_info({name} [, {mode}]) *menu_info()*
< *min()*
min({expr}) Return the minimum value of all items in {expr}.
{expr} can be a List or a Dictionary. For a Dictionary,
{expr} can be a |List| or a |Dictionary|. For a Dictionary,
it returns the minimum of all values in the Dictionary.
If {expr} is neither a List nor a Dictionary, or one of the
items in {expr} cannot be used as a Number this results in
@@ -8014,7 +8027,7 @@ readdirex({directory} [, {expr} [, {dict}]]) *readdirex()*
If {expr} results in 1 then this entry will be added
to the list.
The entries "." and ".." are always excluded.
Each time {expr} is evaluated |v:val| is set to a Dictionary
Each time {expr} is evaluated |v:val| is set to a |Dictionary|
of the entry.
When {expr} is a function the entry is passed as the argument.
For example, to get a list of files ending in ".txt": >
@@ -8263,7 +8276,7 @@ remove({list}, {idx} [, {end}]) *remove()*
Without {end}: Remove the item at {idx} from |List| {list} and
return the item.
With {end}: Remove items from {idx} to {end} (inclusive) and
return a List with these items. When {idx} points to the same
return a |List| with these items. When {idx} points to the same
item as {end} a list with one item is returned. When {end}
points to an item before {idx} this is an error.
See |list-index| for possible values of {idx} and {end}.
@@ -8400,7 +8413,7 @@ screenchar({row}, {col}) *screenchar()*
GetRow()->screenchar(col)
screenchars({row}, {col}) *screenchars()*
The result is a List of Numbers. The first number is the same
The result is a |List| of Numbers. The first number is the same
as what |screenchar()| returns. Further numbers are
composing characters on top of the base character.
This is mainly to be used for testing.
@@ -8565,7 +8578,7 @@ searchcount([{options}]) *searchcount()*
without the "S" flag in 'shortmess'. This works even if
'shortmess' does contain the "S" flag.
This returns a Dictionary. The dictionary is empty if the
This returns a |Dictionary|. The dictionary is empty if the
previous pattern was not set and "pattern" was not specified.
key type meaning ~
@@ -8647,7 +8660,7 @@ searchcount([{options}]) *searchcount()*
" search again
call searchcount()
<
{options} must be a Dictionary. It can contain:
{options} must be a |Dictionary|. It can contain:
key type meaning ~
recompute |Boolean| if |TRUE|, recompute the count
like |n| or |N| was executed.
@@ -9186,10 +9199,12 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
setreg({regname}, {value} [, {options}])
Set the register {regname} to {value}.
If {regname} is "" or "@", the unnamed register '"' is used.
{value} may be any value returned by |getreg()| or
|getreginfo()|, including a |List| or |Dict|.
If {options} contains "a" or {regname} is upper case,
then the value is appended.
{options} can also contain a register type specification:
"c" or "v" |characterwise| mode
"l" or "V" |linewise| mode
@@ -9220,7 +9235,7 @@ setreg({regname}, {value} [, {options}])
register: >
:let var_a = getreginfo()
:call setreg('a', var_a)
< or:
< or: >
:let var_a = getreg('a', 1, 1)
:let var_amode = getregtype('a')
....
@@ -9697,13 +9712,13 @@ state([{what}]) *state()*
something is busy:
m halfway a mapping, :normal command, feedkeys() or
stuffed command
o operator pending or waiting for a command argument,
e.g. after |f|
o operator pending, e.g. after |d|
a Insert mode autocomplete active
x executing an autocommand
w blocked on waiting, e.g. ch_evalexpr(), ch_read() and
ch_readraw() when reading json.
S not triggering SafeState or SafeStateAgain
ch_readraw() when reading json
S not triggering SafeState or SafeStateAgain, e.g. after
|f| or a count
c callback invoked, including timer (repeats for
recursiveness up to "ccc")
s screen has scrolled for messages
@@ -9884,7 +9899,7 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
List [item, item]
Dictionary {key: value, key: value}
When a List or Dictionary has a recursive reference it is
When a |List| or |Dictionary| has a recursive reference it is
replaced by "[...]" or "{...}". Using eval() on the result
will then fail.
@@ -10175,7 +10190,7 @@ synIDtrans({synID}) *synIDtrans()*
:echo synID(line("."), col("."), 1)->synIDtrans()->synIDattr("fg")
synconcealed({lnum}, {col}) *synconcealed()*
The result is a List with currently three items:
The result is a |List| with currently three items:
1. The first item in the list is 0 if the character at the
position {lnum} and {col} is not part of a concealable
region, 1 if it is.
@@ -10220,7 +10235,7 @@ synstack({lnum}, {col}) *synstack()*
system({expr} [, {input}]) *system()* *E677*
Get the output of the shell command {expr} as a string. See
|systemlist()| to get the output as a List.
|systemlist()| to get the output as a |List|.
When {input} is given and is a string this string is written
to a file and passed as stdin to the command. The string is
@@ -10482,7 +10497,7 @@ timer_info([{id}])
returned.
When {id} is omitted information about all timers is returned.
For each timer the information is stored in a Dictionary with
For each timer the information is stored in a |Dictionary| with
these items:
"id" the timer ID
"time" time the timer was started with
@@ -10716,7 +10731,7 @@ undotree() *undotree()*
undo blocks.
The first item in the "entries" list is the oldest undo item.
Each List item is a Dictionary with these items:
Each List item is a |Dictionary| with these items:
"seq" Undo sequence number. Same as what appears in
|:undolist|.
"time" Timestamp when the change happened. Use
@@ -10928,7 +10943,7 @@ win_splitmove({nr}, {target} [, {options}]) *win_splitmove()*
Returns zero for success, non-zero for failure.
{options} is a Dictionary with the following optional entries:
{options} is a |Dictionary| with the following optional entries:
"vertical" When TRUE, the split is created vertically,
like with |:vsplit|.
"rightbelow" When TRUE, the split is made below or to the
@@ -12093,8 +12108,9 @@ An assignment leaves out the `:let` command. |vim9-declaration|
text...
text...
{endmarker}
Set internal variable {var-name} to a List containing
the lines of text bounded by the string {endmarker}.
Set internal variable {var-name} to a |List|
containing the lines of text bounded by the string
{endmarker}.
{endmarker} must not contain white space.
{endmarker} cannot start with a lower case character.
The last line should end only with the {endmarker}