runtime(doc): Normalise formatting of builtin function descriptions
- Column align tags - Move tags to the same line as the function signature - Move descriptions to the line below the function signature - Add missing hyperlinks to builtins in the description text closes: #18478 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a37fd72749
commit
83eb1da19e
@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Oct 12
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Oct 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -854,7 +854,7 @@ add({object}, {expr}) *add()*
|
||||
and({expr}, {expr}) *and()*
|
||||
Bitwise AND on the two arguments. The arguments are converted
|
||||
to a number. A List, Dict or Float argument causes an error.
|
||||
Also see `or()` and `xor()`.
|
||||
Also see |or()| and |xor()|.
|
||||
Example: >
|
||||
:let flag = and(bits, 0x80)
|
||||
< Can also be used as a |method|: >
|
||||
@ -927,14 +927,15 @@ argc([{winid}]) *argc()*
|
||||
|
||||
Return type: |Number|
|
||||
|
||||
*argidx()*
|
||||
argidx() The result is the current index in the argument list. 0 is
|
||||
the first file. argc() - 1 is the last one. See |arglist|.
|
||||
|
||||
argidx() *argidx()*
|
||||
The result is the current index in the argument list. 0 is
|
||||
the first file. |argc()| - 1 is the last one. See |arglist|.
|
||||
|
||||
Return type: |Number|
|
||||
|
||||
*arglistid()*
|
||||
arglistid([{winnr} [, {tabnr}]])
|
||||
|
||||
arglistid([{winnr} [, {tabnr}]]) *arglistid()*
|
||||
Return the argument list ID. This is a number which
|
||||
identifies the argument list being used. Zero is used for the
|
||||
global argument list. See |arglist|.
|
||||
@ -948,8 +949,8 @@ arglistid([{winnr} [, {tabnr}]])
|
||||
|
||||
Return type: |Number|
|
||||
|
||||
*argv()*
|
||||
argv([{nr} [, {winid}]])
|
||||
|
||||
argv([{nr} [, {winid}]]) *argv()*
|
||||
The result is the {nr}th file in the argument list. See
|
||||
|arglist|. "argv(0)" is the first one. Example: >
|
||||
:let i = 0
|
||||
@ -1245,6 +1246,7 @@ balloon_split({msg}) *balloon_split()*
|
||||
|
||||
Return type: list<any> or list<string>
|
||||
|
||||
|
||||
base64_decode({string}) *base64_decode()*
|
||||
Return a Blob containing the bytes decoded from the base64
|
||||
encoded characters in {string}.
|
||||
@ -1293,6 +1295,7 @@ bindtextdomain({package}, {path}) *bindtextdomain()*
|
||||
|
||||
Return type: |vim9-boolean|
|
||||
|
||||
|
||||
blob2list({blob}) *blob2list()*
|
||||
Return a List containing the number value of each byte in Blob
|
||||
{blob}. Examples: >
|
||||
@ -1348,8 +1351,7 @@ blob2str({blob} [, {options}]) *blob2str()*
|
||||
Return type: list<string>
|
||||
|
||||
|
||||
*browse()*
|
||||
browse({save}, {title}, {initdir}, {default})
|
||||
browse({save}, {title}, {initdir}, {default}) *browse()*
|
||||
Put up a file requester. This only works when "has("browse")"
|
||||
returns |TRUE| (only in some GUI versions).
|
||||
The input fields are:
|
||||
@ -1520,7 +1522,7 @@ bufnr([{buf} [, {create}]]) *bufnr()*
|
||||
< The result is a Number, which is the highest buffer number
|
||||
of existing buffers. Note that not all buffers with a smaller
|
||||
number necessarily exist, because ":bwipeout" may have removed
|
||||
them. Use bufexists() to test for the existence of a buffer.
|
||||
them. Use |bufexists()| to test for the existence of a buffer.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
echo bufref->bufnr()
|
||||
@ -1581,8 +1583,7 @@ byte2line({byte}) *byte2line()*
|
||||
<
|
||||
Return type: |Number|
|
||||
|
||||
{not available when compiled without the |+byte_offset|
|
||||
feature}
|
||||
{not available when compiled without the |+byte_offset| feature}
|
||||
|
||||
|
||||
byteidx({expr}, {nr} [, {utf16}]) *byteidx()*
|
||||
@ -1627,7 +1628,7 @@ byteidx({expr}, {nr} [, {utf16}]) *byteidx()*
|
||||
|
||||
|
||||
byteidxcomp({expr}, {nr} [, {utf16}]) *byteidxcomp()*
|
||||
Like byteidx(), except that a composing character is counted
|
||||
Like |byteidx()|, except that a composing character is counted
|
||||
as a separate character. Example: >
|
||||
let s = 'e' .. nr2char(0x301)
|
||||
echo byteidx(s, 1)
|
||||
@ -1636,7 +1637,7 @@ byteidxcomp({expr}, {nr} [, {utf16}]) *byteidxcomp()*
|
||||
< The first and third echo result in 3 ('e' plus composing
|
||||
character is 3 bytes), the second echo results in 1 ('e' is
|
||||
one byte).
|
||||
Only works differently from byteidx() when 'encoding' is set
|
||||
Only works differently from |byteidx()| when 'encoding' is set
|
||||
to a Unicode encoding.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
@ -1749,8 +1750,8 @@ charcol({expr} [, {winid}]) *charcol()*
|
||||
<
|
||||
Return type: |Number|
|
||||
|
||||
*charidx()*
|
||||
charidx({string}, {idx} [, {countcc} [, {utf16}]])
|
||||
|
||||
charidx({string}, {idx} [, {countcc} [, {utf16}]]) *charidx()*
|
||||
Return the character index of the byte at {idx} in {string}.
|
||||
The index of the first character is zero.
|
||||
If there are no multibyte characters the returned value is
|
||||
@ -2067,6 +2068,7 @@ complete_info([{what}]) *complete_info()*
|
||||
<
|
||||
Return type: dict<any>
|
||||
|
||||
|
||||
complete_match([{lnum}, {col}]) *complete_match()*
|
||||
Searches backward from the given position and returns a List
|
||||
of matches according to the 'isexpand' option. When no
|
||||
@ -2111,8 +2113,8 @@ complete_match([{lnum}, {col}]) *complete_match()*
|
||||
<
|
||||
Return type: list<list<any>>
|
||||
|
||||
*confirm()*
|
||||
confirm({msg} [, {choices} [, {default} [, {type}]]])
|
||||
|
||||
confirm({msg} [, {choices} [, {default} [, {type}]]]) *confirm()*
|
||||
confirm() offers the user a dialog, from which a choice can be
|
||||
made. It returns the number of the choice. For the first
|
||||
choice this is 1.
|
||||
@ -2240,8 +2242,8 @@ count({comp}, {expr} [, {ic} [, {start}]]) *count()* *E706*
|
||||
<
|
||||
Return type: |Number|
|
||||
|
||||
*cscope_connection()*
|
||||
cscope_connection([{num} , {dbpath} [, {prepend}]])
|
||||
|
||||
cscope_connection([{num} , {dbpath} [, {prepend}]]) *cscope_connection()*
|
||||
Checks for the existence of a |cscope| connection. If no
|
||||
parameters are specified, then the function returns:
|
||||
0, if cscope was not available (not compiled in), or
|
||||
@ -2415,8 +2417,9 @@ deletebufline({buf}, {first} [, {last}]) *deletebufline()*
|
||||
<
|
||||
Return type: |Number|
|
||||
|
||||
*did_filetype()*
|
||||
did_filetype() Returns |TRUE| when autocommands are being executed and the
|
||||
|
||||
did_filetype() *did_filetype()*
|
||||
Returns |TRUE| when autocommands are being executed and the
|
||||
FileType event has been triggered at least once. Can be used
|
||||
to avoid triggering the FileType event again in the scripts
|
||||
that detect the file type. |FileType|
|
||||
@ -2710,8 +2713,9 @@ escape({string}, {chars}) *escape()*
|
||||
<
|
||||
Return type: |String|
|
||||
|
||||
*eval()*
|
||||
eval({string}) Evaluate {string} and return the result. Especially useful to
|
||||
|
||||
eval({string}) *eval()*
|
||||
Evaluate {string} and return the result. Especially useful to
|
||||
turn the result of |string()| back into the original value.
|
||||
This works for Numbers, Floats, Strings, Blobs and composites
|
||||
of them. Also works for |Funcref|s that refer to existing
|
||||
@ -3094,6 +3098,7 @@ expandcmd({string} [, {options}]) *expandcmd()*
|
||||
<
|
||||
Return type: |String| or list<string> depending on {list}
|
||||
|
||||
|
||||
extend({expr1}, {expr2} [, {expr3}]) *extend()*
|
||||
{expr1} and {expr2} must be both |Lists| or both
|
||||
|Dictionaries|.
|
||||
@ -3551,8 +3556,9 @@ foldlevel({lnum}) *foldlevel()*
|
||||
<
|
||||
Return type: |Number|
|
||||
|
||||
*foldtext()*
|
||||
foldtext() Returns a String, to be displayed for a closed fold. This is
|
||||
|
||||
foldtext() *foldtext()*
|
||||
Returns a String, to be displayed for a closed fold. This is
|
||||
the default function used for the 'foldtext' option and should
|
||||
only be called from evaluating 'foldtext'. It uses the
|
||||
|v:foldstart|, |v:foldend| and |v:folddashes| variables.
|
||||
@ -3632,8 +3638,9 @@ foreach({expr1}, {expr2}) *foreach()* *E1525*
|
||||
Return type: |String|, |Blob|, list<{type}>, tuple<{type}> or
|
||||
dict<{type}> depending on {expr1}
|
||||
|
||||
*foreground()*
|
||||
foreground() Move the Vim window to the foreground. Useful when sent from
|
||||
|
||||
foreground() *foreground()*
|
||||
Move the Vim window to the foreground. Useful when sent from
|
||||
a client to a Vim server. |remote_send()|
|
||||
On Win32 systems this might not work, the OS does not always
|
||||
allow a window to bring itself to the foreground. Use
|
||||
@ -3684,8 +3691,8 @@ funcref({name} [, {arglist}] [, {dict}]) *funcref()*
|
||||
<
|
||||
Return type: func(...): any or |Number| on error
|
||||
|
||||
*function()* *partial* *E700* *E923*
|
||||
function({name} [, {arglist}] [, {dict}])
|
||||
|
||||
function({name} [, {arglist}] [, {dict}]) *function()* *partial* *E700* *E923*
|
||||
Return a |Funcref| variable that refers to function {name}.
|
||||
{name} can be the name of a user defined function or an
|
||||
internal function.
|
||||
@ -3803,6 +3810,7 @@ get({list}, {idx} [, {default}]) *get()* *get()-list*
|
||||
<
|
||||
Return type: any, depending on {list}
|
||||
|
||||
|
||||
get({tuple}, {idx} [, {default}]) *get()-tuple*
|
||||
Get item {idx} from |Tuple| {tuple}. When this item is not
|
||||
available return {default}. Return zero when {default} is
|
||||
@ -3812,6 +3820,7 @@ get({tuple}, {idx} [, {default}]) *get()-tuple*
|
||||
<
|
||||
Return type: any, depending on {tuple}
|
||||
|
||||
|
||||
get({blob}, {idx} [, {default}]) *get()-blob*
|
||||
Get byte {idx} from |Blob| {blob}. When this byte is not
|
||||
available return {default}. Return -1 when {default} is
|
||||
@ -3821,6 +3830,7 @@ get({blob}, {idx} [, {default}]) *get()-blob*
|
||||
<
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
get({dict}, {key} [, {default}]) *get()-dict*
|
||||
Get item with key {key} from |Dictionary| {dict}. When this
|
||||
item is not available return {default}. Return zero when
|
||||
@ -3833,6 +3843,7 @@ get({dict}, {key} [, {default}]) *get()-dict*
|
||||
<
|
||||
Return type: any, depending on {dict}
|
||||
|
||||
|
||||
get({func}, {what}) *get()-func*
|
||||
Get item {what} from |Funcref| {func}. Possible values for
|
||||
{what} are:
|
||||
@ -3860,8 +3871,8 @@ get({func}, {what}) *get()-func*
|
||||
<
|
||||
Return type: any, depending on {func} and {what}
|
||||
|
||||
*getbufinfo()*
|
||||
getbufinfo([{buf}])
|
||||
|
||||
getbufinfo([{buf}]) *getbufinfo()*
|
||||
getbufinfo([{dict}])
|
||||
Get information about buffers as a List of Dictionaries.
|
||||
|
||||
@ -3938,8 +3949,7 @@ getbufinfo([{dict}])
|
||||
Return type: list<dict<any>>
|
||||
|
||||
|
||||
*getbufline()*
|
||||
getbufline({buf}, {lnum} [, {end}])
|
||||
getbufline({buf}, {lnum} [, {end}]) *getbufline()*
|
||||
Return a |List| with the lines starting from {lnum} to {end}
|
||||
(inclusive) in the buffer {buf}. If {end} is omitted, a
|
||||
|List| with only the line {lnum} is returned. See
|
||||
@ -3969,8 +3979,8 @@ getbufline({buf}, {lnum} [, {end}])
|
||||
<
|
||||
Return type: list<string>
|
||||
|
||||
*getbufoneline()*
|
||||
getbufoneline({buf}, {lnum})
|
||||
|
||||
getbufoneline({buf}, {lnum}) *getbufoneline()*
|
||||
Just like `getbufline()` but only get one line and return it
|
||||
as a string.
|
||||
|
||||
@ -4079,9 +4089,9 @@ getchar([{expr} [, {opts}]]) *getchar()*
|
||||
|
||||
When {expr} is 1 only the first byte is returned. For a
|
||||
one-byte character it is the character itself as a number.
|
||||
Use nr2char() to convert it to a String.
|
||||
Use |nr2char()| to convert it to a String.
|
||||
|
||||
Use getcharmod() to obtain any additional modifiers.
|
||||
Use |getcharmod()| to obtain any additional modifiers.
|
||||
|
||||
The optional argument {opts} is a Dict and supports the
|
||||
following items:
|
||||
@ -4164,7 +4174,7 @@ getchar([{expr} [, {opts}]]) *getchar()*
|
||||
|
||||
getcharmod() *getcharmod()*
|
||||
The result is a Number which is the state of the modifiers for
|
||||
the last obtained character with getchar() or in another way.
|
||||
the last obtained character with |getchar()| or in another way.
|
||||
These values are added together:
|
||||
2 shift
|
||||
4 control
|
||||
@ -4229,6 +4239,7 @@ getcharstr([{expr} [, {opts}]]) *getcharstr()*
|
||||
|
||||
Return type: |String|
|
||||
|
||||
|
||||
getcmdcomplpat() *getcmdcomplpat()*
|
||||
Return completion pattern of the current command-line.
|
||||
Only works when the command line is being edited, thus
|
||||
@ -4411,6 +4422,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
<
|
||||
Return type: list<string>
|
||||
|
||||
|
||||
getcompletiontype({pat}) *getcompletiontype()*
|
||||
Return the type of the command-line completion using {pat}.
|
||||
When no corresponding completion type is found, an empty
|
||||
@ -4420,8 +4432,8 @@ getcompletiontype({pat}) *getcompletiontype()*
|
||||
|
||||
Return type: |String|
|
||||
|
||||
*getcurpos()*
|
||||
getcurpos([{winid}])
|
||||
|
||||
getcurpos([{winid}]) *getcurpos()*
|
||||
Get the position of the cursor. This is like getpos('.'), but
|
||||
includes an extra "curswant" item in the list:
|
||||
[0, lnum, col, off, curswant] ~
|
||||
@ -4505,6 +4517,7 @@ getcwd([{winnr} [, {tabnr}]]) *getcwd()*
|
||||
<
|
||||
Return type: |String|
|
||||
|
||||
|
||||
getenv({name}) *getenv()*
|
||||
Return the value of environment variable {name}. The {name}
|
||||
argument is a string, without a leading '$'. Example: >
|
||||
@ -4578,7 +4591,7 @@ getfsize({fname}) *getfsize()*
|
||||
getftime({fname}) *getftime()*
|
||||
The result is a Number, which is the last modification time of
|
||||
the given file {fname}. The value is measured as seconds
|
||||
since 1st Jan 1970, and may be passed to strftime(). See also
|
||||
since 1st Jan 1970, and may be passed to |strftime()|. See also
|
||||
|localtime()| and |strftime()|.
|
||||
If the file {fname} can't be found -1 is returned.
|
||||
|
||||
@ -4614,6 +4627,7 @@ getftype({fname}) *getftype()*
|
||||
<
|
||||
Return type: |String|
|
||||
|
||||
|
||||
getimstatus() *getimstatus()*
|
||||
The result is a Number, which is |TRUE| when the IME status is
|
||||
active and |FALSE| otherwise.
|
||||
@ -4647,8 +4661,8 @@ getjumplist([{winnr} [, {tabnr}]]) *getjumplist()*
|
||||
<
|
||||
Return type: list<any>
|
||||
|
||||
*getline()*
|
||||
getline({lnum} [, {end}])
|
||||
|
||||
getline({lnum} [, {end}]) *getline()*
|
||||
Without {end} the result is a String, which is line {lnum}
|
||||
from the current buffer. Example: >
|
||||
getline(1)
|
||||
@ -4885,7 +4899,7 @@ getqflist([{what}]) *getqflist()*
|
||||
Returns a |List| with all the current quickfix errors. Each
|
||||
list item is a dictionary with these entries:
|
||||
bufnr number of buffer that has the file name, use
|
||||
bufname() to get the name
|
||||
|bufname()| to get the name
|
||||
module module name
|
||||
lnum line number in the buffer (first line is 1)
|
||||
end_lnum
|
||||
@ -5501,7 +5515,7 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()*
|
||||
|
||||
|
||||
glob2regpat({string}) *glob2regpat()*
|
||||
Convert a file pattern, as used by glob(), into a search
|
||||
Convert a file pattern, as used by |glob()|, into a search
|
||||
pattern. The result can be used to match with a string that
|
||||
is a file name. E.g. >
|
||||
if filename =~ glob2regpat('Make*.mak')
|
||||
@ -5519,7 +5533,7 @@ glob2regpat({string}) *glob2regpat()*
|
||||
|
||||
*globpath()*
|
||||
globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
|
||||
Perform glob() for String {expr} on all directories in {path}
|
||||
Perform |glob()| for String {expr} on all directories in {path}
|
||||
and concatenate the results. Example: >
|
||||
:echo globpath(&rtp, "syntax/c.vim")
|
||||
<
|
||||
@ -5781,6 +5795,7 @@ histnr({history}) *histnr()*
|
||||
<
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
hlexists({name}) *hlexists()*
|
||||
The result is a Number, which is TRUE if a highlight group
|
||||
called {name} exists. This is when the group has been
|
||||
@ -5903,6 +5918,7 @@ hlset({list}) *hlset()*
|
||||
<
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
hlID({name}) *hlID()*
|
||||
The result is a Number, which is the ID of the highlight group
|
||||
with name {name}. When the highlight group doesn't exist,
|
||||
@ -6166,7 +6182,7 @@ inputlist({textlist}) *inputlist()*
|
||||
|
||||
inputrestore() *inputrestore()*
|
||||
Restore typeahead that was saved with a previous |inputsave()|.
|
||||
Should be called the same number of times inputsave() is
|
||||
Should be called the same number of times |inputsave()| is
|
||||
called. Calling it more often is harmless though.
|
||||
Returns TRUE when there is nothing to restore, FALSE
|
||||
otherwise.
|
||||
@ -6177,9 +6193,9 @@ inputrestore() *inputrestore()*
|
||||
inputsave() *inputsave()*
|
||||
Preserve typeahead (also from mappings) and clear it, so that
|
||||
a following prompt gets input from the user. Should be
|
||||
followed by a matching inputrestore() after the prompt. Can
|
||||
followed by a matching |inputrestore()| after the prompt. Can
|
||||
be used several times, in which case there must be just as
|
||||
many inputrestore() calls.
|
||||
many |inputrestore()| calls.
|
||||
Returns TRUE when out of memory, FALSE otherwise.
|
||||
|
||||
Return type: |Number|
|
||||
@ -6225,8 +6241,7 @@ insert({object}, {item} [, {idx}]) *insert()*
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
*instanceof()* *E614* *E616* *E693*
|
||||
instanceof({object}, {class})
|
||||
instanceof({object}, {class}) *instanceof()* *E614* *E616* *E693*
|
||||
The result is a Number, which is |TRUE| when the {object}
|
||||
argument is a direct or indirect instance of a |Class|,
|
||||
|Interface|, or class |:type| alias specified by {class}.
|
||||
@ -6240,6 +6255,7 @@ instanceof({object}, {class})
|
||||
<
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
interrupt() *interrupt()*
|
||||
Interrupt script execution. It works more or less like the
|
||||
user typing CTRL-C, most commands won't execute and control
|
||||
@ -6255,6 +6271,7 @@ interrupt() *interrupt()*
|
||||
<
|
||||
Return type: void
|
||||
|
||||
|
||||
invert({expr}) *invert()*
|
||||
Bitwise invert. The argument is converted to a number. A
|
||||
List, Dict or Float argument causes an error. Example: >
|
||||
@ -6545,8 +6562,7 @@ len({expr}) *len()* *E701*
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
*libcall()* *E364* *E368*
|
||||
libcall({libname}, {funcname}, {argument})
|
||||
libcall({libname}, {funcname}, {argument}) *libcall()* *E364* *E368*
|
||||
Call function {funcname} in the run-time library {libname}
|
||||
with single argument {argument}.
|
||||
This is useful to call functions in a library that you
|
||||
@ -6556,7 +6572,7 @@ libcall({libname}, {funcname}, {argument})
|
||||
The result is the String returned by the function. If the
|
||||
function returns NULL, this will appear as an empty string ""
|
||||
to Vim.
|
||||
If the function returns a number, use libcallnr()!
|
||||
If the function returns a number, use |libcallnr()|!
|
||||
If {argument} is a number, it is passed to the function as an
|
||||
int; if {argument} is a string, it is passed as a
|
||||
null-terminated string.
|
||||
@ -6595,8 +6611,8 @@ libcall({libname}, {funcname}, {argument})
|
||||
third argument: >
|
||||
GetValue()->libcall("libc.so", "getenv")
|
||||
<
|
||||
*libcallnr()*
|
||||
libcallnr({libname}, {funcname}, {argument})
|
||||
|
||||
libcallnr({libname}, {funcname}, {argument}) *libcallnr()*
|
||||
Just like |libcall()|, but used for a function that returns an
|
||||
int instead of a string.
|
||||
{only in Win32 and some Unix versions, when the |+libcall|
|
||||
@ -6849,7 +6865,7 @@ listener_flush([{buf}]) *listener_flush()*
|
||||
|
||||
|
||||
listener_remove({id}) *listener_remove()*
|
||||
Remove a listener previously added with listener_add().
|
||||
Remove a listener previously added with |listener_add()|.
|
||||
Returns FALSE when {id} could not be found, TRUE when {id} was
|
||||
removed.
|
||||
|
||||
@ -7080,8 +7096,8 @@ mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()*
|
||||
mapcheck("ax") yes no no
|
||||
mapcheck("b") no no no
|
||||
|
||||
The difference with maparg() is that mapcheck() finds a
|
||||
mapping that matches with {name}, while maparg() only finds a
|
||||
The difference with |maparg()| is that mapcheck() finds a
|
||||
mapping that matches with {name}, while |maparg()| only finds a
|
||||
mapping for {name} exactly.
|
||||
When there is no mapping that starts with {name}, an empty
|
||||
String is returned. If there is one, the RHS of that mapping
|
||||
@ -7384,8 +7400,8 @@ matcharg({nr}) *matcharg()*
|
||||
<
|
||||
Return type: list<string>
|
||||
|
||||
*matchbufline()*
|
||||
matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}])
|
||||
|
||||
matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}]) *matchbufline()*
|
||||
Returns the |List| of matches in lines from {lnum} to {end} in
|
||||
buffer {buf} where {pat} matches.
|
||||
|
||||
@ -7569,7 +7585,7 @@ matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()*
|
||||
|
||||
matchlist({expr}, {pat} [, {start} [, {count}]]) *matchlist()*
|
||||
Same as |match()|, but return a |List|. The first item in the
|
||||
list is the matched string, same as what matchstr() would
|
||||
list is the matched string, same as what |matchstr()| would
|
||||
return. Following items are submatches, like "\1", "\2", etc.
|
||||
in |:substitute|. When an optional submatch didn't match an
|
||||
empty string is used. Example: >
|
||||
@ -7584,8 +7600,8 @@ matchlist({expr}, {pat} [, {start} [, {count}]]) *matchlist()*
|
||||
<
|
||||
Return type: list<string> or list<any>
|
||||
|
||||
*matchstrlist()*
|
||||
matchstrlist({list}, {pat} [, {dict}])
|
||||
|
||||
matchstrlist({list}, {pat} [, {dict}]) *matchstrlist()*
|
||||
Returns the |List| of matches in {list} where {pat} matches.
|
||||
{list} is a |List| of strings. {pat} is matched against each
|
||||
string in {list}.
|
||||
@ -7762,6 +7778,7 @@ menu_info({name} [, {mode}]) *menu_info()*
|
||||
<
|
||||
Return type: dict<any>
|
||||
|
||||
|
||||
min({expr}) *min()*
|
||||
Return the minimum value of all items in {expr}. Example: >
|
||||
echo min([apples, pears, oranges])
|
||||
@ -8764,8 +8781,7 @@ readdirex({directory} [, {expr} [, {dict}]]) *readdirex()*
|
||||
Return type: list<dict<any>> or list<any>
|
||||
|
||||
|
||||
*readfile()*
|
||||
readfile({fname} [, {type} [, {max}]])
|
||||
readfile({fname} [, {type} [, {max}]]) *readfile()*
|
||||
Read file {fname} and return a |List|, each line of the file
|
||||
as an item. Lines are broken at NL characters. Macintosh
|
||||
files separated with CR will result in a single long line
|
||||
@ -8804,6 +8820,7 @@ readfile({fname} [, {type} [, {max}]])
|
||||
<
|
||||
Return type: list<string> or list<any>
|
||||
|
||||
|
||||
reduce({object}, {func} [, {initial}]) *reduce()* *E998*
|
||||
{func} is called for every item in {object}, which can be a
|
||||
|String|, |List|, |Tuple| or a |Blob|. {func} is called with
|
||||
@ -8882,7 +8899,7 @@ reltimefloat({time}) *reltimefloat()*
|
||||
let start = reltime()
|
||||
call MyFunction()
|
||||
let seconds = reltimefloat(reltime(start))
|
||||
< See the note of reltimestr() about overhead.
|
||||
< See the note of |reltimestr()| about overhead.
|
||||
Also see |profiling|.
|
||||
If there is an error 0.0 is returned in legacy script, in Vim9
|
||||
script an error is given.
|
||||
@ -8903,10 +8920,10 @@ reltimestr({time}) *reltimestr()*
|
||||
call MyFunction()
|
||||
echo reltimestr(reltime(start))
|
||||
< Note that overhead for the commands will be added to the time.
|
||||
The accuracy depends on the system. Use reltimefloat() for
|
||||
The accuracy depends on the system. Use |reltimefloat()| for
|
||||
the greatest accuracy which is nanoseconds on some systems.
|
||||
Leading spaces are used to make the string align nicely. You
|
||||
can use split() to remove it. >
|
||||
can use |split()| to remove it. >
|
||||
echo split(reltimestr(reltime(start)))[0]
|
||||
< Also see |profiling|.
|
||||
If there is an error an empty string is returned in legacy
|
||||
@ -8967,7 +8984,7 @@ remote_foreground({server}) *remote_foreground()*
|
||||
around the problem that the OS doesn't always allow the server
|
||||
to bring itself to the foreground.
|
||||
Note: This does not restore the window if it was minimized,
|
||||
like foreground() does.
|
||||
like |foreground()| does.
|
||||
This function is not available in the |sandbox|.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
@ -9025,7 +9042,7 @@ remote_send({server}, {string} [, {idvar}]) *remote_send()* *E241*
|
||||
|:map|.
|
||||
|
||||
If {idvar} is present, it is taken as the name of a variable
|
||||
and a {serverid} for later use with remote_read() is stored
|
||||
and a {serverid} for later use with |remote_read()| is stored
|
||||
there.
|
||||
|
||||
See also |clientserver| |RemoteReply|.
|
||||
@ -9099,6 +9116,7 @@ remove({blob}, {idx}, {end})
|
||||
<
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
remove({dict}, {key})
|
||||
Remove the entry from {dict} with key {key} and return it.
|
||||
Example: >
|
||||
@ -10554,7 +10572,7 @@ sort({list} [, {how} [, {dict}]]) *sort()* *E702*
|
||||
|
||||
When {how} is given and it is 'l' then the current collation
|
||||
locale is used for ordering. Implementation details:
|
||||
strcoll() is used to compare strings. See |:language| check
|
||||
strcoll() is used to compare strings. See |:language| to check
|
||||
or set the collation locale. |v:collate| can also be used to
|
||||
check the current locale. Sorting using the locale typically
|
||||
ignores case. Example: >
|
||||
@ -10627,8 +10645,8 @@ sound_clear() *sound_clear()*
|
||||
|
||||
{only available when compiled with the |+sound| feature}
|
||||
|
||||
*sound_playevent()*
|
||||
sound_playevent({name} [, {callback}])
|
||||
|
||||
sound_playevent({name} [, {callback}]) *sound_playevent()*
|
||||
Play a sound identified by {name}. Which event names are
|
||||
supported depends on the system. Often the XDG sound names
|
||||
are used. On Ubuntu they may be found in
|
||||
@ -10665,8 +10683,8 @@ sound_playevent({name} [, {callback}])
|
||||
|
||||
{only available when compiled with the |+sound| feature}
|
||||
|
||||
*sound_playfile()*
|
||||
sound_playfile({path} [, {callback}])
|
||||
|
||||
sound_playfile({path} [, {callback}]) *sound_playfile()*
|
||||
Like `sound_playevent()` but play sound file {path}. {path}
|
||||
must be a full path. On Ubuntu you may find files to play
|
||||
with this command: >
|
||||
@ -10697,8 +10715,8 @@ sound_stop({id}) *sound_stop()*
|
||||
|
||||
{only available when compiled with the |+sound| feature}
|
||||
|
||||
*soundfold()*
|
||||
soundfold({word})
|
||||
|
||||
soundfold({word}) *soundfold()*
|
||||
Return the sound-folded equivalent of {word}. Uses the first
|
||||
language in 'spelllang' for the current window that supports
|
||||
soundfolding. 'spell' must be set. When no sound folding is
|
||||
@ -10797,6 +10815,7 @@ split({string} [, {pattern} [, {keepempty}]]) *split()*
|
||||
<
|
||||
Return type: list<string>
|
||||
|
||||
|
||||
sqrt({expr}) *sqrt()*
|
||||
Return the non-negative square root of Float {expr} as a
|
||||
|Float|.
|
||||
@ -10856,13 +10875,13 @@ state([{what}]) *state()*
|
||||
<
|
||||
These characters indicate the state, generally indicating that
|
||||
something is busy:
|
||||
m halfway a mapping, :normal command, feedkeys() or
|
||||
m halfway a mapping, :normal command, |feedkeys()| or
|
||||
stuffed command
|
||||
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
|
||||
w blocked on waiting, e.g. |ch_evalexpr()|, |ch_read()| and
|
||||
|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
|
||||
@ -10910,6 +10929,7 @@ str2blob({list} [, {options}]) *str2blob()*
|
||||
<
|
||||
Return type: |Blob|
|
||||
|
||||
|
||||
str2float({string} [, {quoted}]) *str2float()*
|
||||
Convert String {string} to a Float. This mostly works the
|
||||
same as when using a floating point number in an expression,
|
||||
@ -11157,7 +11177,7 @@ string({expr}) *string()*
|
||||
|
||||
When a |List|, |Tuple| or |Dictionary| has a recursive
|
||||
reference it is replaced by "[...]" or "(...)" or "{...}".
|
||||
Using eval() on the result will then fail.
|
||||
Using |eval()| on the result will then fail.
|
||||
|
||||
For an object, invokes the string() method to get a textual
|
||||
representation of the object. If the method is not present,
|
||||
@ -11333,7 +11353,7 @@ strwidth({string}) *strwidth()*
|
||||
|
||||
submatch({nr} [, {list}]) *submatch()* *E935*
|
||||
Only for an expression in a |:substitute| command or
|
||||
substitute() function.
|
||||
|substitute()| function.
|
||||
Returns the {nr}'th submatch of the matched text. When {nr}
|
||||
is 0 the whole matched text is returned.
|
||||
Note that a NL in the string can stand for a line break of a
|
||||
@ -11348,7 +11368,7 @@ submatch({nr} [, {list}]) *submatch()* *E935*
|
||||
|substitute()| this list will always contain one or zero
|
||||
items, since there are no real line breaks.
|
||||
|
||||
When substitute() is used recursively only the submatches in
|
||||
When |substitute()| is used recursively only the submatches in
|
||||
the current (deepest) call can be obtained.
|
||||
|
||||
Returns an empty string or list on error.
|
||||
@ -11502,7 +11522,7 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
|
||||
for that mode. When {mode} is omitted, or an invalid value is
|
||||
used, the attributes for the currently active highlighting are
|
||||
used (GUI, cterm or term).
|
||||
Use synIDtrans() to follow linked highlight groups.
|
||||
Use |synIDtrans()| to follow linked highlight groups.
|
||||
{what} result
|
||||
"name" the name of the syntax item
|
||||
"fg" foreground color (GUI: color name used to set
|
||||
@ -11898,8 +11918,7 @@ terminalprops() *terminalprops()*
|
||||
test_ functions are documented here: |test-functions-details|
|
||||
|
||||
|
||||
*timer_info()*
|
||||
timer_info([{id}])
|
||||
timer_info([{id}]) *timer_info()*
|
||||
Return a list with information about timers.
|
||||
When {id} is given only information about this timer is
|
||||
returned. When timer {id} does not exist an empty list is
|
||||
@ -11994,7 +12013,7 @@ timer_start({time}, {callback} [, {options}])
|
||||
|
||||
timer_stop({timer}) *timer_stop()*
|
||||
Stop a timer. The timer callback will no longer be invoked.
|
||||
{timer} is an ID returned by timer_start(), thus it must be a
|
||||
{timer} is an ID returned by |timer_start()|, thus it must be a
|
||||
Number. If {timer} does not exist there is no error.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
@ -12131,8 +12150,8 @@ tuple2list({tuple}) *tuple2list()*
|
||||
Return type: list<{type}> (depending on the given |Tuple|)
|
||||
|
||||
|
||||
*type()*
|
||||
type({expr}) The result is a Number representing the type of {expr}.
|
||||
type({expr}) *type()*
|
||||
The result is a Number representing the type of {expr}.
|
||||
Instead of using the number directly, it is better to use the
|
||||
v:t_ variable that has the value:
|
||||
Number: 0 |v:t_number|
|
||||
@ -12289,6 +12308,7 @@ uri_decode({string}) *uri_decode()*
|
||||
<
|
||||
Return type: |String|
|
||||
|
||||
|
||||
uri_encode({string}) *uri_encode()*
|
||||
Returns the URI-encoded form of {string}. URI encoding
|
||||
replaces unsafe or reserved characters with percent-encoded
|
||||
@ -12315,8 +12335,8 @@ uri_encode({string}) *uri_encode()*
|
||||
<
|
||||
Return type: |String|
|
||||
|
||||
*utf16idx()*
|
||||
utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
|
||||
|
||||
utf16idx({string}, {idx} [, {countcc} [, {charidx}]]) *utf16idx()*
|
||||
Same as |charidx()| but returns the UTF-16 code unit index of
|
||||
the byte at {idx} in {string} (after converting it to UTF-16).
|
||||
|
||||
@ -12328,7 +12348,7 @@ utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
|
||||
|
||||
Returns -1 if the arguments are invalid or if there are less
|
||||
than {idx} bytes in {string}. If there are exactly {idx}
|
||||
bytes the length of the string in UTF-16 code units is
|
||||
bytes, the length of the string in UTF-16 code units is
|
||||
returned.
|
||||
|
||||
See |byteidx()| and |byteidxcomp()| for getting the byte index
|
||||
@ -12686,8 +12706,8 @@ win_splitmove({nr}, {target} [, {options}]) *win_splitmove()*
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
*winbufnr()*
|
||||
winbufnr({nr}) The result is a Number, which is the number of the buffer
|
||||
winbufnr({nr}) *winbufnr()*
|
||||
The result is a Number, which is the number of the buffer
|
||||
associated with window {nr}. {nr} can be the window number or
|
||||
the |window-ID|.
|
||||
When {nr} is zero, the number of the buffer in the current
|
||||
@ -12702,16 +12722,15 @@ winbufnr({nr}) The result is a Number, which is the number of the buffer
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
*wincol()*
|
||||
wincol() The result is a Number, which is the virtual column of the
|
||||
wincol() *wincol()*
|
||||
The result is a Number, which is the virtual column of the
|
||||
cursor in the window. This is counting screen cells from the
|
||||
left side of the window. The leftmost column is one.
|
||||
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
*windowsversion()*
|
||||
windowsversion()
|
||||
windowsversion() *windowsversion()*
|
||||
The result is a String. For MS-Windows it indicates the OS
|
||||
version. E.g, Windows 10 is "10.0", Windows 8 is "6.2",
|
||||
Windows XP is "5.1". For non-MS-Windows systems the result is
|
||||
@ -12719,6 +12738,7 @@ windowsversion()
|
||||
|
||||
Return type: |String|
|
||||
|
||||
|
||||
winheight({nr}) *winheight()*
|
||||
The result is a Number, which is the height of window {nr}.
|
||||
{nr} can be the window number or the |window-ID|.
|
||||
@ -13031,7 +13051,7 @@ autoservername Automatically enable |clientserver|
|
||||
balloon_eval Compiled with |balloon-eval| support.
|
||||
balloon_multiline GUI supports multiline balloons.
|
||||
beos BeOS version of Vim.
|
||||
browse Compiled with |:browse| support, and browse() will
|
||||
browse Compiled with |:browse| support, and |browse()| will
|
||||
work.
|
||||
browsefilter Compiled with support for |browsefilter|.
|
||||
bsd Compiled on an OS in the BSD family (excluding macOS).
|
||||
|
||||
Reference in New Issue
Block a user