runtime(doc): Normalise formatting of builtin function descriptions
Commit:
https://github.com/vim/vim/commit/83eb1da19eedbd56fe6100d7e9017b8ebca0a35b
Author: Doug Kearns <
dougk...@gmail.com>
Date: Mon Oct 13 19:17:14 2025 +0000
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 <
dougk...@gmail.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index f36688832..fd88b71a9 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -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
@@ -797,7 +797,7 @@ Not all functions are here, some have been moved to a help file covering the
specific functionality.
Return type specifies the type for |Vim9-script|, see |vim9-types|
-abs({expr}) *abs()*
+abs({expr}) *abs()*
Return the absolute value of {expr}. When {expr} evaluates to
a |Float| abs() returns a |Float|. When {expr} can be
converted to a |Number| abs() returns a |Number|. Otherwise
@@ -816,7 +816,7 @@ abs({expr}) *abs()*
Return type: |Number| or |Float| depending on {expr}
-acos({expr}) *acos()*
+acos({expr}) *acos()*
Return the arc cosine of {expr} measured in radians, as a
|Float| in the range of [0, pi].
{expr} must evaluate to a |Float| or a |Number| in the range
@@ -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|: >
@@ -915,7 +915,7 @@ appendbufline({buf}, {lnum}, {text}) *appendbufline()*
Return type: |Number|
-argc([{winid}]) *argc()*
+argc([{winid}]) *argc()*
The result is the number of files in the argument list. See
|arglist|.
If {winid} is not supplied, the argument list of the current
@@ -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|: >
@@ -1660,7 +1661,7 @@ call({func}, {arglist} [, {dict}]) *call()* *E699*
Return type: any, depending on {func}
-ceil({expr}) *ceil()*
+ceil({expr}) *ceil()*
Return the smallest integral value greater than or equal to
{expr} as a |Float| (round up).
{expr} must evaluate to a |Float| or a |Number|.
@@ -1695,7 +1696,7 @@ changenr() *changenr()*
Return type: |Number|
-char2nr({string} [, {utf8}]) *char2nr()*
+char2nr({string} [, {utf8}]) *char2nr()*
Return Number value of the first char in {string}.
Examples: >
char2nr(" ") returns 32
@@ -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
@@ -1916,7 +1917,7 @@ col({expr} [, {winid}]) *col()*
Return type: |Number|
-complete({startcol}, {matches}) *complete()* *E785*
+complete({startcol}, {matches}) *complete()* *E785*
Set the matches for Insert mode completion. Can only be
used in Insert mode. Typically invoked from a mapping with
CTRL-R = (see |i_CTRL-R|), but may also be called from a
@@ -1970,7 +1971,7 @@ complete({startcol}, {matches}) *complete()* *E785*
Return type: |Number|
-complete_add({expr}) *complete_add()*
+complete_add({expr}) *complete_add()*
Add {expr} to the list of matches. Only to be used by the
function specified with the 'completefunc' option.
Returns 0 for failure (empty string or out of memory),
@@ -1985,7 +1986,7 @@ complete_add({expr}) *complete_add()*
Return type: |Number|
-complete_check() *complete_check()*
+complete_check() *complete_check()*
Check for a key typed while looking for completion matches.
This is to be used when looking for matches takes some time.
Returns |TRUE| when searching for matches is to be aborted,
@@ -1996,7 +1997,7 @@ complete_check() *complete_check()*
Return type: |Number|
-complete_info([{what}]) *complete_info()*
+complete_info([{what}]) *complete_info()*
Returns a |Dictionary| with information about Insert mode
completion. See |ins-completion|.
The items are:
@@ -2067,7 +2068,8 @@ complete_info([{what}]) *complete_info()*
<
Return type: dict<any>
-complete_match([{lnum}, {col}]) *complete_match()*
+
+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
arguments are provided, uses the current cursor position.
@@ -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.
@@ -2173,7 +2175,7 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
Return type: |Number|
-copy({expr}) *copy()*
+copy({expr}) *copy()*
Make a copy of {expr}. For Numbers and Strings this isn't
different from using {expr} directly.
When {expr} is a |List| a shallow copy is created. This means
@@ -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
@@ -2355,7 +2357,7 @@ deepcopy({expr} [, {noref}]) *deepcopy()* *E698*
this single copy. With {noref} set to 1 every occurrence of a
|List| or |Dictionary| results in a new copy. This also means
that a cyclic reference causes deepcopy() to fail.
- *E724*
+ *E724*
Nesting is possible up to 100 levels. When there is an item
that refers back to a higher level making a deep copy with
{noref} set to 1 will fail.
@@ -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
@@ -2770,7 +2774,7 @@ executable({expr}) *executable()*
Return type: |Number|
-execute({command} [, {silent}]) *execute()*
+execute({command} [, {silent}]) *execute()*
Execute an Ex command or commands and return the output as a
string.
{command} can be a string or a List. In case of a List the
@@ -2821,7 +2825,7 @@ exepath({expr}) *exepath()*
Return type: |String|
-exists({expr}) *exists()*
+exists({expr}) *exists()*
The result is a Number, which is |TRUE| if {expr} is defined,
zero otherwise.
@@ -2946,7 +2950,7 @@ exists_compiled({expr}) *exists_compiled()*
Return type: |String|
-exp({expr}) *exp()*
+exp({expr}) *exp()*
Return the exponential of {expr} as a |Float| in the range
[0, inf].
{expr} must evaluate to a |Float| or a |Number|.
@@ -2963,7 +2967,7 @@ exp({expr}) *exp()*
Return type: |Float|
-expand({string} [, {nosuf} [, {list}]]) *expand()*
+expand({string} [, {nosuf} [, {list}]]) *expand()*
Expand wildcards and the following special keywords in
{string}. 'wildignorecase' applies.
@@ -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|.
@@ -3321,7 +3326,7 @@ filter({expr1}, {expr2}) *filter()*
depending on {expr1}
-finddir({name} [, {path} [, {count}]]) *finddir()*
+finddir({name} [, {path} [, {count}]]) *finddir()*
Find directory {name} in {path}. Supports both downwards and
upwards recursive directory searches. See |file-searching|
for the syntax of {path}.
@@ -3346,7 +3351,7 @@ finddir({name} [, {path} [, {count}]]) *finddir()*
otherwise
-findfile({name} [, {path} [, {count}]]) *findfile()*
+findfile({name} [, {path} [, {count}]]) *findfile()*
Just like |finddir()|, but find a file instead of a directory.
Uses 'suffixesadd'.
Example: >
@@ -3361,7 +3366,7 @@ findfile({name} [, {path} [, {count}]]) *findfile()*
otherwise
-flatten({list} [, {maxdepth}]) *flatten()*
+flatten({list} [, {maxdepth}]) *flatten()*
Flatten {list} up to {maxdepth} levels. Without {maxdepth}
the result is a |List| without nesting, as if {maxdepth} is
a very large number.
@@ -3369,7 +3374,7 @@ flatten({list} [, {maxdepth}]) *flatten()*
not want that.
In Vim9 script flatten() cannot be used, you must always use
|flattennew()|.
- *E900*
+ *E900*
{maxdepth} means how deep in nested lists changes are made.
{list} is not modified when {maxdepth} is 0.
{maxdepth} must be positive number.
@@ -3422,7 +3427,7 @@ float2nr({expr}) *float2nr()*
Return type: |Number|
-floor({expr}) *floor()*
+floor({expr}) *floor()*
Return the largest integral value less than or equal to
{expr} as a |Float| (round down).
{expr} must evaluate to a |Float| or a |Number|.
@@ -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,15 +3979,15 @@ 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.
Return type: |String|
-getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
+getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
The result is the value of option or local buffer variable
{varname} in buffer {buf}. Note that the name without "b:"
must be used.
@@ -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] ~
@@ -4452,7 +4464,7 @@ getcurpos([{winid}])
Return type: list<number>
-getcursorcharpos([{winid}]) *getcursorcharpos()*
+getcursorcharpos([{winid}]) *getcursorcharpos()*
Same as |getcurpos()| but the column number in the returned
List is a character index instead of a byte index.
@@ -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)
@@ -4808,7 +4822,7 @@ getmouseshape() *getmouseshape()*
Return type: |String|
-getpid() *getpid()*
+getpid() *getpid()*
Return a Number which is the process ID of the Vim process.
On Unix and MS-Windows this is a unique number, until Vim
exits.
@@ -4816,9 +4830,9 @@ getpid() *getpid()*
Return type: |Number|
-getpos({expr}) *getpos()*
+getpos({expr}) *getpos()*
Get the position for String {expr}.
- The accepted values for {expr} are: *E1209*
+ The accepted values for {expr} are: *E1209*
. The cursor position.
$ The last line in the current buffer.
'x Position of mark x (if the mark is not set, 0 is
@@ -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
@@ -5111,7 +5125,7 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()*
Return type: list<string>
-getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()*
+getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()*
Same as |getregion()|, but returns a list of positions
describing the buffer text segments bound by {pos1} and
{pos2}.
@@ -5248,7 +5262,7 @@ gettabinfo([{tabnr}]) *gettabinfo()*
Return type: list<dict<any>>
-gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()*
+gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()*
Get the value of a tab-local variable {varname} in tab page
{tabnr}. |t:var|
Tabs are numbered starting with one.
@@ -5264,7 +5278,7 @@ gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()*
Return type: any, depending on {varname}
-gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
+gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
Get the value of window-local variable {varname} in window
{winnr} in tab page {tabnr}.
The {varname} argument is a string. When {varname} is empty a
@@ -5445,7 +5459,7 @@ getwinposy() *getwinposy()*
Return type: |Number|
-getwinvar({winnr}, {varname} [, {def}]) *getwinvar()*
+getwinvar({winnr}, {varname} [, {def}]) *getwinvar()*
Like |gettabwinvar()| for the current tabpage.
Examples: >
:let list_is_on = getwinvar(2, '&list')
@@ -5457,7 +5471,7 @@ getwinvar({winnr}, {varname} [, {def}]) *getwinvar()*
Return type: any, depending on {varname}
-glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()*
+glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()*
Expand the file wildcards in {expr}. See |wildcards| for the
use of special characters.
@@ -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')
@@ -5517,9 +5531,9 @@ glob2regpat({string}) *glob2regpat()*
<
Return type: |String|
- *globpath()*
+ *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")
<
@@ -5561,7 +5575,7 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
on {list}
-has({feature} [, {check}]) *has()*
+has({feature} [, {check}]) *has()*
When {check} is omitted or is zero: The result is a Number,
which is 1 if the feature {feature} is supported, zero
otherwise. The {feature} argument is a string, case is
@@ -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,7 +5918,8 @@ hlset({list}) *hlset()*
<
Return type: |Number|
-hlID({name}) *hlID()*
+
+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,
zero is returned.
@@ -5953,7 +5969,7 @@ iconv({string}, {from}, {to}) *iconv()*
Return type: |String|
-id({item}) *id()*
+id({item}) *id()*
The result is a unique String associated with the {item} and
not with the {item}'s contents. It is only valid while the
{item} exists and is referenced. It is valid only in the
@@ -5981,7 +5997,7 @@ id({item}) *id()*
Return type: |String|
-indent({lnum}) *indent()*
+indent({lnum}) *indent()*
The result is a Number, which is indent of line {lnum} in the
current buffer. The indent is counted in spaces, the value
of 'tabstop' is relevant. {lnum} is used just like in
@@ -5995,7 +6011,7 @@ indent({lnum}) *indent()*
Return type: |Number|
-index({object}, {expr} [, {start} [, {ic}]]) *index()*
+index({object}, {expr} [, {start} [, {ic}]]) *index()*
Find {expr} in {object} and return its index. See
|indexof()| for using a lambda to select the item.
@@ -6121,7 +6137,7 @@ input({prompt} [, {text} [, {completion}]]) *input()*
Return type: |String|
-inputdialog({prompt} [, {text} [, {cancelreturn}]]) *inputdialog()*
+inputdialog({prompt} [, {text} [, {cancelreturn}]]) *inputdialog()*
Like |input()|, but when the GUI is running and text dialogs
are supported, a dialog window pops up to input the text.
Example: >
@@ -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: >
@@ -6427,7 +6444,7 @@ js_encode({expr}) *js_encode()*
Return type: |String|
-json_decode({string}) *json_decode()* *E491*
+json_decode({string}) *json_decode()* *E491*
This parses a JSON formatted string and returns the equivalent
in Vim values. See |json_encode()| for the relation between
JSON and Vim values.
@@ -6455,7 +6472,7 @@ json_decode({string}) *json_decode()* *E491*
a 12 character sequence such as "\uD834\uDD1E", but
json_decode() silently accepts truncated surrogate pairs
such as "\uD834" or "\uD834\u"
- *E938*
+ *E938*
A duplicate key in an object, valid in rfc7159, is not
accepted by json_decode() as the result must be a valid Vim
type, e.g. this fails: {"a":"b", "a":"c"}
@@ -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.
@@ -6899,7 +6915,7 @@ log10({expr}) *log10()*
Return type: |Float|
-luaeval({expr} [, {expr}]) *luaeval()*
+luaeval({expr} [, {expr}]) *luaeval()*
Evaluate Lua expression {expr} and return its result converted
to Vim data structures. Second {expr} may hold additional
argument accessible as _A inside first {expr}.
@@ -6987,7 +7003,7 @@ map({expr1}, {expr2}) *map()*
depending on {expr1}
-maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
+maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
When {dict} is omitted or zero: Return the rhs of mapping
{name} in mode {mode}. The returned String has special
characters translated like in the output of the ":map" command
@@ -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
@@ -7140,7 +7156,7 @@ maplist([{abbr}]) *maplist()*
Return type: list<dict<any>>
-mapnew({expr1}, {expr2}) *mapnew()*
+mapnew({expr1}, {expr2}) *mapnew()*
Like |map()| but instead of replacing items in {expr1} a new
List or Dictionary is created and returned. {expr1} remains
unchanged. Items can still be changed by {expr2}, if you
@@ -7150,7 +7166,7 @@ mapnew({expr1}, {expr2}) *mapnew()*
depending on {expr1}
-mapset({mode}, {abbr}, {dict}) *mapset()*
+mapset({mode}, {abbr}, {dict}) *mapset()*
mapset({dict})
Restore a mapping from a dictionary, possibly returned by
|maparg()| or |maplist()|. A buffer mapping, when dict.buffer
@@ -7192,7 +7208,7 @@ mapset({dict})
Return type: |Number|
-match({expr}, {pat} [, {start} [, {count}]]) *match()*
+match({expr}, {pat} [, {start} [, {count}]]) *match()*
When {expr} is a |List| then this returns the index of the
first item where {pat} matches. Each item is used as a
String, |Lists| and |Dictionaries| are used as echoed.
@@ -7209,10 +7225,10 @@ match({expr}, {pat} [, {start} [, {count}]]) *match()*
:echo match("testing", "ing") " results in 4
:echo match([1, 'x'], ' ') " results in 1
< See |string-match| for how {pat} is used.
- *strpbrk()*
+ *strpbrk()*
Vim doesn't have a strpbrk() function. But you can do: >
:let sepidx = match(line, '[.,;: ]')
-< *strcasestr()*
+< *strcasestr()*
Vim doesn't have a strcasestr() function. But you can add
"