# byteidx
byteidx({string}, {nr} [, {utf16}])
Byte index of the {nr}'th character in {string}.
vimlrs v0.2.0 · 463 entries · 11 chapters · generated from vimlrs/builtin_docs.rs
Every implemented Vim builtin, supported option, ex-command, and v: constant with an LSP hover doc — rendered from the exact corpus that vimlrs --lsp serves. Jump via the chapter index, or Ctrl+F for a specific name.
byteidxbyteidx({string}, {nr} [, {utf16}])
Byte index of the {nr}'th character in {string}.
byteidxcompbyteidxcomp({string}, {nr} [, {utf16}])
Like byteidx() but counting composing characters separately.
char2nrchar2nr({string} [, {utf8}])
Codepoint of the first character of {string}.
charclasscharclass({string})
Character class (0 white, 1 punctuation, 2 word, ...) of the first char of {string}.
charidxcharidx({string}, {idx} [, {countcc} [, {utf16}]])
Character index of byte {idx} in {string}.
digraph_getdigraph_get({chars})
The digraph character defined for the two-character {chars}.
digraph_getlistdigraph_getlist([{listall}])
List of [chars, digraph] pairs for the defined digraphs.
digraph_setdigraph_set({chars}, {digraph})
Define {chars} as a digraph producing {digraph}; returns v:true.
digraph_setlistdigraph_setlist({list})
Define multiple digraphs from a List of [chars, digraph] pairs.
escapeescape({string}, {chars})
{string} with each character in {chars} prefixed by a backslash.
expandcmdexpandcmd({string} [, {options}])
{string} with command-line special items ('%', '<cword>', ...) expanded.
fnameescapefnameescape({string})
{string} escaped for use as a Vim command file-name argument.
gettextgettext({text} [, {package}])
Translated {text} via gettext (identity when no catalog).
iconviconv({string}, {from}, {to})
{string} converted from encoding {from} to {to}.
joinjoin({list} [, {sep}])
String of {list} items joined by {sep} (default space).
keytranskeytrans({string})
{string} with key codes translated to readable form (e.g. <C-A>).
list2strlist2str({list} [, {utf8}])
String built from the List of codepoint numbers {list}.
matchmatch({expr}, {pat} [, {start} [, {count}]])
Byte index where {pat} matches in {expr}, else -1.
matchbuflinematchbufline({buf}, {pat}, {lnum}, {end} [, {dict}])
List of matches of {pat} in buffer {buf} lines {lnum}..{end}.
matchendmatchend({expr}, {pat} [, {start} [, {count}]])
Byte index just after the match of {pat} in {expr}, else -1.
matchfuzzymatchfuzzy({list}, {str} [, {dict}])
Items of {list} fuzzy-matching {str}, best first.
matchfuzzyposmatchfuzzypos({list}, {str} [, {dict}])
Like matchfuzzy() plus match positions and scores.
matchlistmatchlist({expr}, {pat} [, {start} [, {count}]])
List of the full match and submatches of {pat} in {expr}.
matchstrmatchstr({expr}, {pat} [, {start} [, {count}]])
Matched substring of {pat} in {expr}, or empty string.
matchstrlistmatchstrlist({list}, {pat} [, {dict}])
List of dicts describing matches of {pat} across the strings in {list}.
matchstrposmatchstrpos({expr}, {pat} [, {start} [, {count}]])
[match, start, end] of {pat} in {expr}.
nr2charnr2char({expr} [, {utf8}])
Character whose codepoint is {expr}.
printfprintf({fmt} [, {expr1} ...])
Formatted string from printf-style {fmt} and arguments.
repeatrepeat({expr}, {count})
{expr} (String or List) repeated {count} times.
sha256sha256({string})
SHA-256 hex digest of {string}.
shellescapeshellescape({string} [, {special}])
{string} quoted for safe use as a shell command argument.
soundfoldsoundfold({word})
Sound-folded (phonetic) form of {word}.
splitsplit({string} [, {pat} [, {keepempty}]])
List of {string} split on {pat} (default whitespace).
str2floatstr2float({string} [, {quoted}])
Float parsed from {string}.
str2liststr2list({string} [, {utf8}])
List of codepoint numbers for each character in {string}.
str2nrstr2nr({string} [, {base}])
Leading integer parsed from {string} in {base} (default 10).
strcharlenstrcharlen({string})
Number of characters in {string}, ignoring composing characters.
strcharpartstrcharpart({src}, {start} [, {len} [, {skipcc}]])
Character substring of {src} from char {start} for {len} chars.
strcharsstrchars({string} [, {skipcc}])
Number of characters in {string}, counting composing chars unless {skipcc}.
strdisplaywidthstrdisplaywidth({string} [, {col}])
Display cell width of {string}, honoring 'tabstop'.
strgetcharstrgetchar({str}, {index})
Codepoint at char {index} of {str}, or -1.
stridxstridx({haystack}, {needle} [, {start}])
Byte index of first {needle} in {haystack} at/after {start}, else -1.
stringstring({expr})
String representation of {expr}, quoting embedded strings (inverse of eval()).
strlenstrlen({string})
Number of bytes in {string}.
strpartstrpart({src}, {start} [, {len} [, {chars}]])
Byte (or char) substring of {src} from {start} for {len}.
strridxstrridx({haystack}, {needle} [, {start}])
Byte index of last {needle} in {haystack} at/before {start}, else -1.
strtransstrtrans({string})
{string} with unprintable characters shown as ^X / <xx>.
strutf16lenstrutf16len({string} [, {countcc}])
Number of UTF-16 code units in {string}.
strwidthstrwidth({string})
Display cell width of {string} (no tab expansion).
submatchsubmatch({nr} [, {list}])
The {nr}'th submatch of the substitute() replacement.
substitutesubstitute({string}, {pat}, {sub}, {flags})
{string} with matches of {pat} replaced by {sub}; {flags} 'g' replaces all.
tolowertolower({string})
{string} with all letters lowercased.
touppertoupper({string})
{string} with all letters uppercased.
trtr({src}, {fromstr}, {tostr})
{src} with each char in {fromstr} replaced by the matching char in {tostr}.
trimtrim({text} [, {mask} [, {dir}]])
{text} with leading/trailing {mask} chars (default whitespace) removed.
utf16idxutf16idx({string}, {idx} [, {countcc} [, {charidx}]])
UTF-16 code-unit index of byte {idx} in {string}.
addadd({object}, {expr})
Append {expr} to List or Blob {object}; returns {object}.
blob2listblob2list({blob})
List of byte-value Numbers for each byte of {blob}.
copycopy({expr})
Shallow copy of {expr}.
countcount({comp}, {expr} [, {ic} [, {start}]])
Number of times {expr} occurs in String/List/Dict {comp}.
deepcopydeepcopy({expr} [, {noref}])
Recursive (deep) copy of {expr}.
flattenflatten({list} [, {maxdepth}])
Flatten nested List {list} in place up to {maxdepth}.
flattennewflattennew({list} [, {maxdepth}])
Flattened copy of nested List {list}, leaving {list} unchanged.
foreachforeach({expr1}, {expr2})
Apply {expr2} to each item of {expr1} for its side effects; returns {expr1}.
indexindex({object}, {expr} [, {start} [, {ic}]])
Index of first item equal to {expr} in {object}, else -1.
indexofindexof({object}, {expr} [, {opts}])
Index of first item for which {expr} is true, else -1.
insertinsert({object}, {item} [, {idx}])
Insert {item} into List/Blob {object} before index {idx} (default 0).
list2bloblist2blob({list})
Blob built from the List of byte-value Numbers {list}.
mapnewmapnew({expr1}, {expr2})
Like map() but returns a new container, leaving {expr1} unchanged.
maxmax({expr})
Maximum value among the items of List/Dict {expr} (0 if empty).
minmin({expr})
Minimum value among the items of List/Dict {expr} (0 if empty).
rangerange({expr} [, {max} [, {stride}]])
List of numbers from {expr} to {max} stepping by {stride}.
reducereduce({object}, {func} [, {initial}])
Fold {object} to a single value via {func}, starting at {initial}.
removeremove({object}, {idx} [, {end}])
Remove and return item {idx} (or range {idx}..{end}) from {object}.
reversereverse({object})
Reverse List/Blob {object} in place; returns {object}.
sliceslice({expr}, {start} [, {end}])
Sub-list/Blob/String of {expr} from {start} up to (not including) {end}.
sortsort({list} [, {how} [, {dict}]])
Sort {list} in place; {how} sets comparison; returns {list}.
uniquniq({list} [, {how} [, {dict}]])
Remove adjacent duplicate items from sorted {list} in place.
dictwatcheradddictwatcheradd({dict}, {pattern}, {callback})
Register {callback} to fire when keys matching {pattern} in {dict} change.
dictwatcherdeldictwatcherdel({dict}, {pattern}, {callback})
Remove a watcher previously added with dictwatcheradd().
extendextend({expr1}, {expr2} [, {expr3}])
Append/merge {expr2} into List/Dict {expr1} in place; returns {expr1}.
extendnewextendnew({expr1}, {expr2} [, {expr3}])
Like extend() but returns a new container, leaving {expr1} unchanged.
getget({collection}, {key} [, {default}])
Item {key}/{idx} of Dict/List/Blob, or {default} if absent.
has_keyhas_key({dict}, {key})
1 if {dict} has an entry {key}, else 0.
itemsitems({dict})
List of [key, value] pairs in {dict}.
keyskeys({dict})
List of all keys in {dict}.
valuesvalues({dict})
List of all values in {dict}.
emptyempty({expr})
1 if {expr} is empty (0, '', [], {}, v:null), else 0.
existsexists({expr})
1 if variable/option/function/command {expr} exists, else 0.
funcreffuncref({name} [, {arglist}] [, {dict}])
Funcref bound by reference to {name} (ignores later redefinition).
functionfunction({name} [, {arglist}] [, {dict}])
Funcref for builtin/user function {name}, optionally bound to args/dict.
garbagecollectgarbagecollect([{atexit}])
Run the cyclic-reference garbage collector (stub in standalone).
islockedislocked({expr})
1 if the variable named by {expr} is locked, else 0 (stub in standalone).
lenlen({expr})
Length of String/List/Dict/Blob {expr}.
typetype({expr})
Numeric type code of {expr} (0 Number, 1 String, 2 Func, 3 List, 4 Dict, ...).
absabs({expr})
Absolute value of {expr} (Float in -> Float out).
andand({expr1}, {expr2})
Bitwise AND of {expr1} and {expr2}.
atan2atan2({expr1}, {expr2})
Arc tangent of {expr1}/{expr2} in radians (-pi..pi).
float2nrfloat2nr({expr})
{expr} truncated toward zero to a Number.
fmodfmod({expr1}, {expr2})
Floating-point remainder of {expr1} / {expr2}.
invertinvert({expr})
Bitwise complement (NOT) of {expr}.
isinfisinf({expr})
1 if {expr} is +inf, -1 if -inf, else 0.
isnanisnan({expr})
1 if {expr} is a NaN Float, else 0.
oror({expr1}, {expr2})
Bitwise OR of {expr1} and {expr2}.
powpow({x}, {y})
{x} raised to the power {y} as a Float.
randrand([{expr}])
Pseudo-random 32-bit Number, optionally from seed-list {expr}.
srandsrand([{expr}])
Initialize and return a seed List for rand().
xorxor({expr1}, {expr2})
Bitwise XOR of {expr1} and {expr2}.
appendappend({lnum}, {text})
Append {text} (String or List) below line {lnum}; 0 on success.
appendbuflineappendbufline({buf}, {lnum}, {text})
Append {text} below line {lnum} of buffer {buf}.
browsebrowse({save}, {title}, {initdir}, {default})
Prompt for a file name via a dialog (GUI).
browsedirbrowsedir({title}, {initdir})
Prompt for a directory via a dialog (GUI).
bufaddbufadd({name})
Add a buffer for file {name} (without loading) and return its number (stub in standalone).
bufexistsbufexists({buf})
1 if buffer {buf} exists, else 0 (stub in standalone).
buflistedbuflisted({buf})
1 if buffer {buf} exists and is listed, else 0 (stub in standalone).
bufloadbufload({buf})
Ensure buffer {buf} is loaded (reading the file if needed) (stub in standalone).
bufloadedbufloaded({buf})
1 if buffer {buf} exists and is loaded, else 0 (stub in standalone).
bufnamebufname([{buf}])
Name of buffer {buf} (default current) (stub in standalone).
bufnrbufnr([{buf} [, {create}]])
Buffer number of {buf}; optionally create it (stub in standalone).
bufwinidbufwinid({buf})
window-ID of the first window showing buffer {buf}, else -1 (stub in standalone).
bufwinnrbufwinnr({buf})
Window number of the first window showing buffer {buf}, else -1 (stub in standalone).
byte2linebyte2line({byte})
Line number containing byte offset {byte}, else -1.
changenrchangenr()
Sequence number of the current entry in the buffer's change list (stub in standalone).
charcolcharcol({expr} [, {winid}])
Character column for position {expr}.
chdirchdir({dir})
Change the working directory to {dir}; returns the previous directory.
cindentcindent({lnum})
C-indent amount Vim would use for line {lnum}.
colcol({expr} [, {winid}])
Byte column for position {expr}.
deletedelete({fname} [, {flags}])
Delete file (or, with 'd'/'rf', directory) {fname}; 0 on success.
deletebuflinedeletebufline({buf}, {first} [, {last}])
Delete lines {first}..{last} from buffer {buf}.
executableexecutable({expr})
1 if {expr} is an executable found in $PATH, else 0.
exepathexepath({expr})
Full path of the executable {expr}, or empty if not found.
expandexpand({string} [, {nosuf} [, {list}]])
Expand wildcards and keywords ('%', '<cfile>', '~', ...) in {string}.
filecopyfilecopy({from}, {to})
Copy file {from} to {to}; v:true on success.
filereadablefilereadable({file})
1 if {file} exists and is readable, else 0.
filewritablefilewritable({file})
1 if {file} is writable, 2 if it is a writable directory, else 0.
finddirfinddir({name} [, {path} [, {count}]])
Find directory {name} in {path}; the {count}'th match (or List).
findfilefindfile({name} [, {path} [, {count}]])
Find file {name} in {path}; the {count}'th match (or List).
fnamemodifyfnamemodify({fname}, {mods})
Modify file name {fname} per the :p/:h/:t/:r/:e {mods}.
getbufinfogetbufinfo([{buf}])
List of dicts with information about buffers.
getbuflinegetbufline({buf}, {lnum} [, {end}])
List of lines {lnum}..{end} from buffer {buf}.
getbufonelinegetbufoneline({buf}, {lnum})
Single line {lnum} from buffer {buf} as a String.
getbufvargetbufvar({buf}, {varname} [, {def}])
Buffer-local variable/option {varname} from buffer {buf}.
getchangelistgetchangelist([{buf}])
[changelist, index] for buffer {buf}.
getcwdgetcwd([{winnr} [, {tabnr}]])
Current working directory (optionally of a window/tab).
getfontnamegetfontname([{name}])
Name of the font currently in use (GUI) (stub in standalone).
getfpermgetfperm({fname})
Permissions of {fname} as a 9-character 'rwxrwxrwx' String.
getfsizegetfsize({fname})
Size of file {fname} in bytes (-1 if absent, -2 if too large).
getftimegetftime({fname})
Last modification time of {fname} as seconds since the epoch, else -1.
getftypegetftype({fname})
Type of file {fname}: 'file', 'dir', 'link', 'fifo', etc.
getlinegetline({lnum} [, {end}])
Text of line {lnum} (or List of lines {lnum}..{end}) in the current buffer.
globglob({expr} [, {nosuf} [, {list} [, {alllinks}]]])
Expand file wildcards {expr}; String (or List) of matching paths.
glob2regpatglob2regpat({string})
Vim regexp pattern equivalent to the file glob {string}.
globpathglobpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
Expand {expr} in every directory of {path}.
haslocaldirhaslocaldir([{winnr} [, {tabnr}]])
1 if the window/tab has a local working directory.
indentindent({lnum})
Indent (in spaces) of line {lnum} in the current buffer.
isabsolutepathisabsolutepath({path})
1 if {path} is an absolute path, else 0.
isdirectoryisdirectory({directory})
1 if {directory} exists and is a directory, else 0.
last_buffer_nrlast_buffer_nr()
Number of the last (highest-numbered) buffer (stub in standalone).
lineline({expr} [, {winid}])
Line number for position {expr} ('.', '$', mark, ...).
line2byteline2byte({lnum})
Byte offset of the first byte of line {lnum} (1-based), else -1.
lispindentlispindent({lnum})
Lisp indent amount Vim would use for line {lnum}.
mkdirmkdir({name} [, {flags} [, {prot}]])
Create directory {name} ('p' makes parents); 1 on success.
nextnonblanknextnonblank({lnum})
Line number of the first non-blank line at/after {lnum}, else 0.
pathshortenpathshorten({path} [, {len}])
Shorten directory components of {path} to {len} characters.
prevnonblankprevnonblank({lnum})
Line number of the first non-blank line at/before {lnum}, else 0.
readblobreadblob({fname} [, {offset} [, {size}]])
Blob of the (partial) contents of file {fname}.
readdirreaddir({directory} [, {expr}])
List of file names in {directory}, optionally filtered by {expr}.
readfilereadfile({fname} [, {type} [, {max}]])
List of lines read from file {fname}.
renamerename({from}, {to})
Rename/move file {from} to {to}; 0 on success.
resolveresolve({filename})
Resolve symbolic links in {filename} to its real path.
setbuflinesetbufline({buf}, {lnum}, {text})
Set line {lnum} of buffer {buf} to {text}.
setbufvarsetbufvar({buf}, {varname}, {val})
Set buffer-local variable/option {varname} in buffer {buf} (stub in standalone).
setfpermsetfperm({fname}, {mode})
Set permissions of {fname} from a 9-character 'rwxrwxrwx' {mode}.
setlinesetline({lnum}, {text})
Set line {lnum} to {text} (String or List of lines); 0 on success.
simplifysimplify({filename})
Simplify {filename} by resolving '.', '..' and doubled separators (no disk access).
swapfilelistswapfilelist()
List of swap files found in the 'directory' directories.
swapinfoswapinfo({fname})
Dict of information read from swap file {fname}.
swapnameswapname({buf})
Swap-file name of buffer {buf}, or empty if none (stub in standalone).
tempnametempname()
Name of a unique, not-yet-existing temporary file.
undofileundofile({name})
Undo-file path Vim would use for file {name}.
undotreeundotree([{buf}])
Dict describing the undo tree of the buffer.
virtcolvirtcol({expr} [, {list} [, {winid}]])
Screen (virtual) column of position {expr}.
virtcol2colvirtcol2col({winid}, {lnum}, {col})
Byte index in line {lnum} of screen column {col} in window {winid}.
winbufnrwinbufnr({nr})
Buffer number of window {nr}, else -1 (stub in standalone).
writefilewritefile({object}, {fname} [, {flags}])
Write List of lines or Blob {object} to file {fname}; 0 on success.
chanclosechanclose({id} [, {stream}])
Close channel {id} (or one of its streams) (stub in standalone).
chansendchansend({id}, {data})
Send {data} to channel {id}; returns bytes written (stub in standalone).
environenviron()
Dict of all environment variables and their values.
getenvgetenv({name})
Value of environment variable {name}, or v:null if unset.
getpidgetpid()
Process ID of the Vim process.
hostnamehostname()
Name of the host Vim is running on.
jobpidjobpid({id})
Process ID of job {id} (stub in standalone).
jobresizejobresize({id}, {width}, {height})
Resize the pseudo-terminal of job {id} (stub in standalone).
jobstartjobstart({cmd} [, {opts}])
Start job running {cmd}; returns a job id (or <=0 on failure) (stub in standalone).
jobstopjobstop({id})
Stop job {id} (stub in standalone).
jobwaitjobwait({ids} [, {timeout}])
Wait for the jobs {ids} to finish; List of exit codes.
json_decodejson_decode({string})
Vim value decoded from JSON text {string}.
json_encodejson_encode({expr})
JSON text encoding of {expr}.
libcalllibcall({lib}, {func}, {arg})
Call function {func} in dynamic library {lib} (String result) (stub in standalone).
libcallnrlibcallnr({lib}, {func}, {arg})
Call function {func} in dynamic library {lib} (Number result) (stub in standalone).
localtimelocaltime()
Current time as seconds since the Unix epoch.
luaevalluaeval({expr} [, {expr}])
Evaluate Lua expression {expr} and return the result.
msgpackdumpmsgpackdump({list} [, {type}])
msgpack byte representation of the items in {list}.
msgpackparsemsgpackparse({data})
List of Vim values parsed from msgpack {data}.
perlevalperleval({expr})
Evaluate Perl expression {expr} and return the result.
py3evalpy3eval({expr})
Evaluate Python 3 expression {expr} and return the result.
pyevalpyeval({expr})
Evaluate Python (2) expression {expr} and return the result.
pyxevalpyxeval({expr})
Evaluate Python (pyx) expression {expr} and return the result.
reltimereltime([{start} [, {end}]])
High-resolution time value, or an elapsed interval.
reltimefloatreltimefloat({time})
reltime() value as a Float number of seconds.
reltimestrreltimestr({time})
reltime() value formatted as a 'seconds.microseconds' String.
rpcnotifyrpcnotify({channel}, {event} [, {args} ...])
Send an RPC notification {event} to {channel} (stub in standalone).
rpcrequestrpcrequest({channel}, {method} [, {args} ...])
Send a blocking RPC request {method} to {channel} and return the result (stub in standalone).
rpcstartrpcstart({prog} [, {argv}])
Deprecated: start an RPC channel to {prog} (stub in standalone).
rpcstoprpcstop({channel})
Deprecated: close RPC channel {channel} (stub in standalone).
rubyevalrubyeval({expr})
Evaluate Ruby expression {expr} and return the result.
serverlistserverlist()
Newline-separated list of server addresses Vim is listening on.
serverstartserverstart([{address}])
Start an RPC server, returning its listen address (stub in standalone).
serverstopserverstop({address})
Stop the RPC server listening on {address} (stub in standalone).
setenvsetenv({name}, {val})
Set environment variable {name} to {val} (v:null unsets it).
sockconnectsockconnect({mode}, {address} [, {opts}])
Connect a socket to {address} (tcp/pipe); returns a channel id (stub in standalone).
stdioopenstdioopen({opts})
Open a channel on Vim's own stdin/stdout (stub in standalone).
stdpathstdpath({what})
Standard config/data/cache/state path(s) for {what}.
strftimestrftime({format} [, {time}])
Format time {time} (default now) with strftime() {format}.
strptimestrptime({format}, {timestring})
Parse {timestring} per {format} into seconds since the epoch.
systemsystem({cmd} [, {input}])
Run shell {cmd}, returning its output as a String.
systemlistsystemlist({cmd} [, {input}])
Run shell {cmd}, returning its output as a List of lines.
termopentermopen({cmd} [, {opts}])
Open a terminal running {cmd} in the current buffer (stub in standalone).
windowsversionwindowsversion()
Microsoft Windows version string ('' on other systems) (stub in standalone).
api_infoapi_info()
Dict describing the Nvim API (version, functions, types).
argcargc([{winid}])
Number of files in the argument list.
argidxargidx()
Current index into the argument list.
arglistidarglistid([{winnr} [, {tabnr}]])
Identifier of the argument list used by a window.
argvargv([{nr} [, {winid}]])
Argument-list entry {nr} (or the whole List).
assert_equalassert_equal({expected}, {actual} [, {msg}])
Add an error to v:errors unless {expected} == {actual}.
assert_equalfileassert_equalfile({fname1}, {fname2} [, {msg}])
Add an error to v:errors unless the two files have equal contents.
assert_exceptionassert_exception({error} [, {msg}])
Add an error to v:errors unless v:exception contains {error}.
assert_falseassert_false({actual} [, {msg}])
Add an error to v:errors unless {actual} is false.
assert_inrangeassert_inrange({lower}, {upper}, {actual} [, {msg}])
Add an error to v:errors unless {lower} <= {actual} <= {upper}.
assert_matchassert_match({pat}, {actual} [, {msg}])
Add an error to v:errors unless {pat} matches {actual}.
assert_notequalassert_notequal({expected}, {actual} [, {msg}])
Add an error to v:errors unless {expected} != {actual}.
assert_notmatchassert_notmatch({pat}, {actual} [, {msg}])
Add an error to v:errors unless {pat} does not match {actual}.
assert_reportassert_report({msg})
Add {msg} to v:errors unconditionally.
assert_trueassert_true({actual} [, {msg}])
Add an error to v:errors unless {actual} is true.
callcall({func}, {arglist} [, {dict}])
Call {func} with the List {arglist} as its arguments (stub in standalone).
clearmatchesclearmatches([{win}])
Clear all matches added with matchadd()/matchaddpos().
cmdcomplete_infocmdcomplete_info([{what}])
Dict of information about the current command-line completion.
completecomplete({startcol}, {matches})
Set the Insert-mode completion list to {matches} starting at {startcol} (stub in standalone).
complete_addcomplete_add({expr})
Add {expr} to the completion list during a 'completefunc'.
complete_checkcomplete_check()
1 if completion was aborted by typed input.
complete_infocomplete_info([{what}])
Dict of information about the current Insert-mode completion.
confirmconfirm({msg} [, {choices} [, {default} [, {type}]]])
Show dialog {msg} with {choices}; return the chosen button number.
ctxgetctxget([{index}])
Dict for the {index}'th entry on the context stack.
ctxpopctxpop()
Pop and restore the top editor context from the stack (stub in standalone).
ctxpushctxpush([{types}])
Push the editor context (of {types}) onto the context stack (stub in standalone).
ctxsetctxset({context} [, {index}])
Set the {index}'th context-stack entry from {context} (stub in standalone).
ctxsizectxsize()
Number of entries on the context stack (stub in standalone).
cursorcursor({lnum}, {col} [, {off}])
Move the cursor to line {lnum}, column {col}.
debugbreakdebugbreak({pid})
Interrupt process {pid} (MS-Windows debugging helper) (stub in standalone).
did_filetypedid_filetype()
1 if a FileType autocommand has run for the current buffer (stub in standalone).
diff_fillerdiff_filler({lnum})
Number of filler lines above diff line {lnum}.
diff_hlIDdiff_hlID({lnum}, {col})
Diff highlight ID at line {lnum}, column {col}.
evaleval({string})
Evaluate {string} as a Vim expression (inverse of string()) (stub in standalone).
eventhandlereventhandler()
1 if Vim is inside an event handler (e.g. processing a callback) (stub in standalone).
executeexecute({command} [, {silent}])
Execute Ex {command}(s) and return their captured output (stub in standalone).
feedkeysfeedkeys({string} [, {mode}])
Push {string} into the typeahead buffer as if typed (stub in standalone).
filterfilter({expr1}, {expr2})
Keep items of {expr1} for which {expr2} is non-zero; in place.
foldclosedfoldclosed({lnum})
First line of the closed fold at {lnum}, else -1.
foldclosedendfoldclosedend({lnum})
Last line of the closed fold at {lnum}, else -1.
foldlevelfoldlevel({lnum})
Fold nesting level of line {lnum}.
foldtextfoldtext()
Text Vim shows for the closed fold on the current line.
foldtextresultfoldtextresult({lnum})
The 'foldtext' string for the fold at {lnum}.
foregroundforeground()
Bring the Vim window to the foreground (GUI/clients) (stub in standalone).
fullcommandfullcommand({name} [, {vim9}])
Full Ex-command name for the abbreviation {name}.
getcellwidthsgetcellwidths()
List of [low, high, width] cell-width overrides set with setcellwidths().
getchargetchar([{expr} [, {opts}]])
Get one character of user input as a Number or special-key String.
getcharmodgetcharmod()
Bitmask of modifier keys held for the last getchar().
getcharposgetcharpos({expr})
Like getpos() but the column is a character index.
getcharsearchgetcharsearch()
Dict describing the last character search (f/t/F/T).
getcharstrgetcharstr([{expr} [, {opts}]])
Like getchar() but always returns the character as a String.
getcmdcomplpatgetcmdcomplpat()
Pattern used for completion of the current command line.
getcmdcompltypegetcmdcompltype()
Completion type of the current command line.
getcmdlinegetcmdline()
Current command-line contents.
getcmdposgetcmdpos()
1-based byte position of the cursor in the command line.
getcmdpromptgetcmdprompt()
Prompt string of the current input()/command line.
getcmdscreenposgetcmdscreenpos()
Screen cursor position within the command line.
getcmdtypegetcmdtype()
Type of the current command line (':', '/', '?', '@', '-', '=').
getcmdwintypegetcmdwintype()
Type of the command-line window, or empty if none (stub in standalone).
getcompletiongetcompletion({pat}, {type} [, {filtered}])
List of command-line completion candidates for {pat} of {type}.
getcompletiontypegetcompletiontype({pat})
Completion type Vim would use for command line {pat}.
getcurposgetcurpos([{winid}])
Cursor position of a window including curswant.
getcursorcharposgetcursorcharpos([{winid}])
Like getcurpos() but the column is a character index.
getjumplistgetjumplist([{winnr} [, {tabnr}]])
[jumplist, index] for a window.
getloclistgetloclist({nr} [, {what}])
List of location-list entries for window {nr}.
getmarklistgetmarklist([{buf}])
List of marks (global, or local to buffer {buf}).
getmatchesgetmatches([{win}])
List of matches added with matchadd()/setmatches().
getmouseposgetmousepos()
Dict with the last known mouse position.
getposgetpos({expr})
Position [bufnum, lnum, col, off] of {expr}.
getqflistgetqflist([{what}])
List of quickfix entries (or info per {what}).
getreggetreg([{regname} [, {list} [, {opts}]]])
Contents of register {regname}.
getreginfogetreginfo([{regname}])
Dict describing register {regname} (value, type, width).
getregiongetregion({pos1}, {pos2} [, {opts}])
List of text lines for the region between {pos1} and {pos2}.
getregionposgetregionpos({pos1}, {pos2} [, {opts}])
List of [start, end] position pairs for each line of a region.
getregtypegetregtype([{regname}])
Type of register {regname}: 'v', 'V', or blockwise.
getscriptinfogetscriptinfo([{opts}])
List of dicts describing the sourced Vim scripts.
getstacktracegetstacktrace()
List describing the current Vimscript call stack.
gettabinfogettabinfo([{tabnr}])
List of dicts with information about tab pages.
gettabvargettabvar({tabnr}, {varname} [, {def}])
Tab-local variable {varname} of tab {tabnr}.
gettabwinvargettabwinvar({tabnr}, {winnr}, {varname} [, {def}])
Window-local variable in window {winnr} of tab {tabnr}.
gettagstackgettagstack([{winnr}])
Dict describing the tag stack of window {winnr}.
getwininfogetwininfo([{winid}])
List of dicts with information about windows.
getwinposgetwinpos([{timeout}])
[x, y] pixel position of the Vim window.
getwinposxgetwinposx()
X pixel position of the left of the Vim window, else -1 (stub in standalone).
getwinposygetwinposy()
Y pixel position of the top of the Vim window, else -1 (stub in standalone).
getwinvargetwinvar({nr}, {varname} [, {def}])
Window-local variable/option {varname} of window {nr}.
hashas({feature} [, {check}])
1 if Vim supports {feature}, else 0.
hasmaptohasmapto({what} [, {mode} [, {abbr}]])
1 if a mapping exists whose rhs contains {what}.
highlight_existshighlight_exists({name})
1 if highlight group {name} is defined (alias of hlexists()).
histaddhistadd({history}, {item})
Add {item} to the {history} list (cmd/search/expr/input).
histdelhistdel({history} [, {item}])
Delete entries from the {history} list.
histgethistget({history} [, {index}])
Entry {index} from the {history} list.
histnrhistnr({history})
Index of the most recent entry in the {history} list.
hlIDhlID({name})
Numeric ID of highlight group {name} (0 if undefined).
hlexistshlexists({name})
1 if highlight group {name} is defined, else 0 (stub in standalone).
idid({expr})
Unique String identifier for the container or value {expr}.
inputinput({prompt} [, {text} [, {completion}]])
Prompt for and return a line of input from the user.
inputdialoginputdialog({prompt} [, {text} [, {cancelreturn}]])
Like input() but using a GUI dialog when available.
inputlistinputlist({textlist})
Prompt the user to pick a numbered entry from {textlist}.
inputrestoreinputrestore()
Restore typeahead previously saved with inputsave() (stub in standalone).
inputsaveinputsave()
Save and clear pending typeahead so input() can be used (stub in standalone).
inputsecretinputsecret({prompt} [, {text}])
Like input() but the typed text is hidden.
interruptinterrupt()
Interrupt script execution as if CTRL-C were pressed (stub in standalone).
mapmap({expr1}, {expr2})
Replace each item of List/Dict/Blob/String {expr1} with {expr2}; in place.
mapargmaparg({name} [, {mode} [, {abbr} [, {dict}]]])
rhs (or Dict) of the mapping of {name} in {mode}.
mapcheckmapcheck({name} [, {mode} [, {abbr}]])
rhs of a mapping that {name} could match, else empty.
maplistmaplist([{abbr}])
List of dicts describing all mappings.
mapsetmapset({mode}, {abbr}, {dict})
Restore a mapping from a maparg() dict.
matchaddmatchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
Highlight {pattern} with {group}; returns the match id.
matchaddposmatchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
Highlight positions {pos} with {group}; returns the match id.
matchargmatcharg({nr})
['pattern', 'group'] for the {nr}'th :match command.
matchdeletematchdelete({id} [, {win}])
Delete the match with {id}.
menu_getmenu_get({path} [, {modes}])
List of dicts describing the menus under {path}.
menu_infomenu_info({name} [, {mode}])
Dict of information about menu {name}.
modemode([{expr}])
Current mode as a short String ('n', 'i', 'v', ...).
preinsertedpreinserted()
Text inserted by the current 'completefunc'/preinsert, if any.
prompt_appendbufprompt_appendbuf({buf}, {expr})
Append {expr} to prompt-buffer {buf} above the prompt (stub in standalone).
prompt_getinputprompt_getinput({buf})
Current input line in prompt-buffer {buf} (stub in standalone).
prompt_getpromptprompt_getprompt({buf})
Prompt string of prompt-buffer {buf} (stub in standalone).
prompt_setcallbackprompt_setcallback({buf}, {expr})
Set the callback invoked on Enter in prompt-buffer {buf} (stub in standalone).
prompt_setinterruptprompt_setinterrupt({buf}, {expr})
Set the callback invoked on CTRL-C in prompt-buffer {buf} (stub in standalone).
prompt_setpromptprompt_setprompt({buf}, {text})
Set the prompt of prompt-buffer {buf} to {text} (stub in standalone).
pum_getpospum_getpos()
Dict describing the popup menu position, or empty if hidden.
pumvisiblepumvisible()
1 if the Insert-mode popup menu is visible, else 0 (stub in standalone).
reg_executingreg_executing()
Name of the register being executed (replayed), or empty (stub in standalone).
reg_recordedreg_recorded()
Name of the register last recorded into, or empty (stub in standalone).
reg_recordingreg_recording()
Name of the register being recorded into, or empty (stub in standalone).
screenattrscreenattr({row}, {col})
Highlight attribute id of the screen cell at {row},{col} (stub in standalone).
screencharscreenchar({row}, {col})
Codepoint of the character on the screen at {row},{col} (stub in standalone).
screencharsscreenchars({row}, {col})
List of codepoints (incl. composing) at screen cell {row},{col}.
screencolscreencol()
Current cursor screen column (stub in standalone).
screenposscreenpos({winid}, {lnum}, {col})
Screen position of buffer position {lnum},{col}.
screenrowscreenrow()
Current cursor screen row (stub in standalone).
screenstringscreenstring({row}, {col})
String of the character(s) at screen cell {row},{col} (stub in standalone).
searchsearch({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
Search for {pattern}; returns the matching line number, else 0.
searchcountsearchcount([{options}])
Dict of search match counts for the last/used pattern.
searchdeclsearchdecl({name} [, {global} [, {thisblock}]])
Move to the declaration of {name}; 0 if found (stub in standalone).
searchpairsearchpair({start}, {middle}, {end} [, {flags} ...])
Search for the matching {end} of a nested {start}/{end} pair.
searchpairpossearchpairpos({start}, {middle}, {end} [, {flags} ...])
Like searchpair() but returns the [line, col] of the match.
searchpossearchpos({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
Like search() but returns the [line, col] of the match.
setcellwidthssetcellwidths({list})
Override the display cell width of character ranges from {list}.
setcharpossetcharpos({expr}, {list})
Like setpos() but the column in {list} is a character index.
setcharsearchsetcharsearch({dict})
Set the last character-search state from {dict} (stub in standalone).
setcmdlinesetcmdline({str} [, {pos}])
Set the command line to {str} with the cursor at {pos}.
setcmdpossetcmdpos({pos})
Set the cursor position in the command line to {pos}.
setcursorcharpossetcursorcharpos({lnum}, {col} [, {off}])
Move the cursor to character position {lnum},{col}.
setloclistsetloclist({nr}, {list} [, {action} [, {what}]])
Set the location list for window {nr}.
setmatchessetmatches({list} [, {win}])
Restore matches from a List produced by getmatches().
setpossetpos({expr}, {list})
Set cursor/mark position {expr} from [bufnum, lnum, col, off].
setqflistsetqflist({list} [, {action} [, {what}]])
Set the quickfix list.
setregsetreg({regname}, {value} [, {options}])
Set register {regname} to {value} with optional type {options}.
settabvarsettabvar({tabnr}, {varname}, {val})
Set tab-local variable {varname} of tab {tabnr} (stub in standalone).
settabwinvarsettabwinvar({tabnr}, {winnr}, {varname}, {val})
Set a window-local variable in window {winnr} of tab {tabnr} (stub in standalone).
settagstacksettagstack({winnr}, {dict} [, {action}])
Set the tag stack of window {winnr} (stub in standalone).
setwinvarsetwinvar({nr}, {varname}, {val})
Set window-local variable/option {varname} of window {nr} (stub in standalone).
shiftwidthshiftwidth([{col}])
Effective 'shiftwidth' value (resolving 0 to 'tabstop').
sign_definesign_define({name} [, {dict}])
Define sign {name} with attributes; 0 on success.
sign_getdefinedsign_getdefined([{name}])
List of defined signs (or just {name}).
sign_getplacedsign_getplaced([{buf} [, {dict}]])
List of signs placed in a buffer.
sign_jumpsign_jump({id}, {group}, {buf})
Jump to sign {id} of {group} in buffer {buf}.
sign_placesign_place({id}, {group}, {name}, {buf} [, {dict}])
Place sign {name} in buffer {buf}; returns the sign id.
sign_placelistsign_placelist({list})
Place a List of signs at once; List of ids.
sign_undefinesign_undefine([{name}])
Undefine sign {name} (or all signs).
sign_unplacesign_unplace({group} [, {dict}])
Remove placed sign(s) in {group}.
sign_unplacelistsign_unplacelist({list})
Remove a List of placed signs.
spellbadwordspellbadword([{sentence}])
[badword, type] of the first misspelled word at/after the cursor.
spellsuggestspellsuggest({word} [, {max} [, {capital}]])
List of spelling suggestions for {word}.
statestate([{what}])
String of characters describing Vim's current busy/blocking state (stub in standalone).
synIDsynID({lnum}, {col}, {trans})
Syntax ID at line {lnum}, column {col} (stub in standalone).
synIDattrsynIDattr({synID}, {what} [, {mode}])
Attribute {what} of syntax ID {synID} (stub in standalone).
synIDtranssynIDtrans({synID})
Translated (effective) syntax ID for {synID} (stub in standalone).
synconcealedsynconcealed({lnum}, {col})
Info about concealed text at line {lnum}, column {col}.
synstacksynstack({lnum}, {col})
List of syntax IDs stacked at line {lnum}, column {col}.
tabpagebuflisttabpagebuflist([{arg}])
List of buffer numbers shown in a tab page (stub in standalone).
tabpagenrtabpagenr([{arg}])
Number of the current (or last) tab page (stub in standalone).
tabpagewinnrtabpagewinnr({tabnr} [, {arg}])
Number of the current window in tab {tabnr} (stub in standalone).
tagfilestagfiles()
List of tags files used by the current buffer.
taglisttaglist({expr} [, {filename}])
List of tags matching the regexp {expr}.
test_garbagecollect_nowtest_garbagecollect_now()
Test helper: run the garbage collector immediately (stub in standalone).
test_write_list_logtest_write_list_log({fname})
Test helper: write the internal list-allocation log to {fname} (stub in standalone).
timer_infotimer_info([{id}])
List of dicts describing active timers.
timer_pausetimer_pause({timer}, {paused})
Pause or unpause timer {timer} (stub in standalone).
timer_starttimer_start({time}, {callback} [, {options}])
Start a timer firing {callback} after {time} ms; returns its id (stub in standalone).
timer_stoptimer_stop({timer})
Stop timer {timer} (stub in standalone).
timer_stopalltimer_stopall()
Stop all timers (stub in standalone).
visualmodevisualmode([{expr}])
Last Visual mode used ('v', 'V', or CTRL-V) (stub in standalone).
waitwait({timeout}, {condition} [, {interval}])
Wait until {condition} is true or {timeout} ms elapse (stub in standalone).
wildmenumodewildmenumode()
1 if the wildmenu command-line completion menu is active (stub in standalone).
wildtriggerwildtrigger()
Trigger command-line ('wildchar') completion programmatically (stub in standalone).
win_executewin_execute({id}, {command} [, {silent}])
Execute {command} as if in window {id}, returning its output (stub in standalone).
win_findbufwin_findbuf({bufnr})
List of window-IDs that display buffer {bufnr}.
win_getidwin_getid([{win} [, {tab}]])
window-ID of window {win} in tab {tab} (stub in standalone).
win_gettypewin_gettype([{nr}])
Type of window {nr} ('popup', 'command', 'autocmd', ...).
win_gotoidwin_gotoid({id})
Go to the window with window-ID {id}; 1 on success (stub in standalone).
win_id2tabwinwin_id2tabwin({id})
[tabnr, winnr] of window-ID {id}.
win_id2winwin_id2win({id})
Window number of window-ID {id}, else 0 (stub in standalone).
win_move_separatorwin_move_separator({nr}, {offset})
Move the vertical separator of window {nr} by {offset} (stub in standalone).
win_move_statuslinewin_move_statusline({nr}, {offset})
Move the status line of window {nr} by {offset} (stub in standalone).
win_screenposwin_screenpos({nr})
[row, col] screen position of the top-left of window {nr}.
win_splitmovewin_splitmove({nr}, {target} [, {options}])
Move window {nr} to split alongside window {target} (stub in standalone).
wincolwincol()
Cursor's screen column within its window (stub in standalone).
winheightwinheight({nr})
Height (in lines) of window {nr}, else -1 (stub in standalone).
winlayoutwinlayout([{tabnr}])
Nested List describing the window layout of a tab page.
winlinewinline()
Cursor's screen row within its window (stub in standalone).
winnrwinnr([{arg}])
Number of the current (or related) window (stub in standalone).
winrestcmdwinrestcmd()
Ex command string that restores the current window sizes (stub in standalone).
winrestviewwinrestview({dict})
Restore the window view from a winsaveview() dict (stub in standalone).
winsaveviewwinsaveview()
Dict capturing the current window view (cursor, scroll).
winwidthwinwidth({nr})
Width (in columns) of window {nr}, else -1 (stub in standalone).
wordcountwordcount()
Dict of byte/char/word counts for the buffer and cursor.
echo:echo {expr} — evaluate and display {expr} (space-separated).
echon:echon {expr} — like :echo but without a trailing newline.
echomsg:echomsg {expr} — display {expr} and save it in the message history.
let:let {var} = {expr} — assign the value of {expr} to {var}.
call:call {func}({args}) — call a function and discard its return value.
eval:eval {expr} — evaluate {expr} for its side effects.
ignorecase:set ignorecase (ic) — Bool, default 0
Ignore case in search patterns.
smartcase:set smartcase (scs) — Bool, default 0
Override 'ignorecase' when the pattern has uppercase letters.
magic:set magic (magic) — Bool, default 1
Use 'magic' regexp special-character meanings.
expandtab:set expandtab (et) — Bool, default 0
Insert spaces instead of a <Tab>.
number:set number (nu) — Bool, default 0
Show line numbers in the left margin.
relativenumber:set relativenumber (rnu) — Bool, default 0
Show line numbers relative to the cursor.
wrap:set wrap (wrap) — Bool, default 1
Wrap long lines to fit the window width.
hlsearch:set hlsearch (hls) — Bool, default 0
Highlight all matches of the last search pattern.
incsearch:set incsearch (is) — Bool, default 0
Show the match for the search pattern as it is typed.
autoindent:set autoindent (ai) — Bool, default 0
Copy the indent of the current line to a new line.
tabstop:set tabstop (ts) — Number, default 8
Number of spaces a <Tab> counts for.
shiftwidth:set shiftwidth (sw) — Number, default 8
Number of spaces used for each step of (auto)indent.
softtabstop:set softtabstop (sts) — Number, default 0
Number of spaces a <Tab> counts for while editing.
textwidth:set textwidth (tw) — Number, default 0
Maximum text width; longer lines are broken (0 = off).
scrolloff:set scrolloff (so) — Number, default 0
Minimum lines kept above and below the cursor.
v:trueBoolean true; numeric value 1, string value "v:true".
v:falseBoolean false; numeric value 0, string value "v:false".
v:nullNull value; behaves like an empty string in most contexts.