diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2025-02-05 23:09:29 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2025-02-05 23:09:29 +0000 |
commit | d5f194ce780c95821a855aca3c19426576d28ae0 (patch) | |
tree | d45f461b19f9118ad2bb1f440a7a08973ad18832 /runtime/doc/builtin.txt | |
parent | c5d770d311841ea5230426cc4c868e8db27300a8 (diff) | |
parent | 44740e561fc93afe3ebecfd3618bda2d2abeafb0 (diff) | |
download | rneovim-rahm.tar.gz rneovim-rahm.tar.bz2 rneovim-rahm.zip |
Diffstat (limited to 'runtime/doc/builtin.txt')
-rw-r--r-- | runtime/doc/builtin.txt | 326 |
1 files changed, 179 insertions, 147 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index ada3b7103c..96574e2899 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1174,16 +1174,22 @@ complete_info([{what}]) *complete_info()* See |complete_info_mode| for the values. pum_visible |TRUE| if popup menu is visible. See |pumvisible()|. - items List of completion matches. Each item is a - dictionary containing the entries "word", + items List of all completion candidates. Each item + is a dictionary containing the entries "word", "abbr", "menu", "kind", "info" and "user_data". See |complete-items|. + matches Same as "items", but only returns items that + are matching current query. If both "matches" + and "items" are in "what", the returned list + will still be named "items", but each item + will have an additional "match" field. selected Selected item index. First index is zero. Index is -1 if no item is selected (showing typed text only, or the last completion after no item is selected when using the <Up> or <Down> keys) - inserted Inserted string. [NOT IMPLEMENTED YET] + completed Return a dictionary containing the entries of + the currently selected index item. preview_winid Info floating preview window id. preview_bufnr Info floating preview buffer id. @@ -1305,10 +1311,10 @@ copy({expr}) *copy()* Also see |deepcopy()|. Parameters: ~ - • {expr} (`any`) + • {expr} (`T`) Return: ~ - (`any`) + (`T`) cos({expr}) *cos()* Return the cosine of {expr}, measured in radians, as a |Float|. @@ -1407,7 +1413,7 @@ ctxset({context} [, {index}]) *ctxset()* • {index} (`integer?`) Return: ~ - (`any`) + (`integer`) ctxsize() *ctxsize()* Returns the size of the |context-stack|. @@ -1490,11 +1496,11 @@ deepcopy({expr} [, {noref}]) *deepcopy()* *E69 Also see |copy()|. Parameters: ~ - • {expr} (`any`) + • {expr} (`T`) • {noref} (`boolean?`) Return: ~ - (`any`) + (`T`) delete({fname} [, {flags}]) *delete()* Without {flags} or with {flags} empty: Deletes the file by the @@ -1618,7 +1624,7 @@ did_filetype() *did_filetype()* file. Return: ~ - (`any`) + (`integer`) diff_filler({lnum}) *diff_filler()* Returns the number of filler lines above line {lnum}. @@ -1633,7 +1639,7 @@ diff_filler({lnum}) *diff_filler()* • {lnum} (`integer`) Return: ~ - (`any`) + (`integer`) diff_hlID({lnum}, {col}) *diff_hlID()* Returns the highlight ID for diff mode at line {lnum} column @@ -1674,7 +1680,7 @@ digraph_get({chars}) *digraph_get()* *E121 • {chars} (`string`) Return: ~ - (`any`) + (`string`) digraph_getlist([{listall}]) *digraph_getlist()* Return a list of digraphs. If the {listall} argument is given @@ -1695,7 +1701,7 @@ digraph_getlist([{listall}]) *digraph_getlist()* • {listall} (`boolean?`) Return: ~ - (`any`) + (`string[][]`) digraph_set({chars}, {digraph}) *digraph_set()* Add digraph {chars} to the list. {chars} must be a string @@ -1756,7 +1762,7 @@ empty({expr}) *empty()* • {expr} (`any`) Return: ~ - (`any`) + (`integer`) environ() *environ()* Return all of environment variables as dictionary. You can @@ -1783,7 +1789,7 @@ escape({string}, {chars}) *escape()* • {chars} (`string`) Return: ~ - (`any`) + (`string`) eval({string}) *eval()* Evaluate {string} and return the result. Especially useful to @@ -2666,7 +2672,7 @@ foreach({expr1}, {expr2}) *foreach()* • {expr2} (`string|function`) Return: ~ - (`any`) + (`string|table`) fullcommand({name}) *fullcommand()* Get the full command name from a short abbreviated command @@ -2997,10 +3003,10 @@ getbufline({buf}, {lnum} [, {end}]) *getbufline()* Parameters: ~ • {buf} (`integer|string`) • {lnum} (`integer`) - • {end_} (`integer?`) + • {end} (`integer?`) Return: ~ - (`any`) + (`string[]`) getbufoneline({buf}, {lnum}) *getbufoneline()* Just like `getbufline()` but only get one line and return it @@ -3073,14 +3079,16 @@ getchangelist([{buf}]) *getchangelist()* Return: ~ (`table[]`) -getchar([{expr}]) *getchar()* +getchar([{expr} [, {opts}]]) *getchar()* Get a single character from the user or input stream. - If {expr} is omitted, wait until a character is available. + If {expr} is omitted or is -1, wait until a character is + available. If {expr} is 0, only get a character when one is available. Return zero otherwise. If {expr} is 1, only check if a character is available, it is not consumed. Return zero if no character available. - If you prefer always getting a string use |getcharstr()|. + If you prefer always getting a string use |getcharstr()|, or + specify |FALSE| as "number" in {opts}. Without {expr} and when {expr} is 0 a whole character or special key is returned. If it is a single character, the @@ -3090,7 +3098,8 @@ getchar([{expr}]) *getchar()* starting with 0x80 (decimal: 128). This is the same value as the String "\<Key>", e.g., "\<Left>". The returned value is also a String when a modifier (shift, control, alt) was used - that is not included in the character. + that is not included in the character. |keytrans()| can also + be used to convert a returned String into a readable form. When {expr} is 0 and Esc is typed, there will be a short delay while Vim waits to see if this is the start of an escape @@ -3102,6 +3111,32 @@ getchar([{expr}]) *getchar()* Use getcharmod() to obtain any additional modifiers. + The optional argument {opts} is a Dict and supports the + following items: + + cursor A String specifying cursor behavior + when waiting for a character. + "hide": hide the cursor. + "keep": keep current cursor unchanged. + "msg": move cursor to message area. + (default: automagically decide + between "keep" and "msg") + + number If |TRUE|, return a Number when getting + a single character. + If |FALSE|, the return value is always + converted to a String, and an empty + String (instead of 0) is returned when + no character is available. + (default: |TRUE|) + + simplify If |TRUE|, include modifiers in the + character if possible. E.g., return + the same value for CTRL-I and <Tab>. + If |FALSE|, don't include modifiers in + the character. + (default: |TRUE|) + When the user clicks a mouse button, the mouse event will be returned. The position can then be found in |v:mouse_col|, |v:mouse_lnum|, |v:mouse_winid| and |v:mouse_win|. @@ -3139,10 +3174,11 @@ getchar([{expr}]) *getchar()* < Parameters: ~ - • {expr} (`0|1?`) + • {expr} (`-1|0|1?`) + • {opts} (`table?`) Return: ~ - (`integer`) + (`integer|string`) getcharmod() *getcharmod()* The result is a Number which is the state of the modifiers for @@ -3207,19 +3243,12 @@ getcharsearch() *getcharsearch()* (`table`) getcharstr([{expr}]) *getcharstr()* - Get a single character from the user or input stream as a - string. - If {expr} is omitted, wait until a character is available. - If {expr} is 0 or false, only get a character when one is - available. Return an empty string otherwise. - If {expr} is 1 or true, only check if a character is - available, it is not consumed. Return an empty string - if no character is available. - Otherwise this works like |getchar()|, except that a number - result is converted to a string. + The same as |getchar()|, except that this always returns a + String, and "number" isn't allowed in {opts}. Parameters: ~ - • {expr} (`0|1?`) + • {expr} (`-1|0|1?`) + • {opts} (`table?`) Return: ~ (`string`) @@ -3295,7 +3324,7 @@ getcmdscreenpos() *getcmdscreenpos()* |setcmdline()|. Return: ~ - (`any`) + (`integer`) getcmdtype() *getcmdtype()* Return the current command-line type. Possible return values @@ -3635,7 +3664,7 @@ getline({lnum} [, {end}]) *getline()* Parameters: ~ • {lnum} (`integer|string`) - • {end_} (`nil|false?`) + • {end} (`nil|false?`) Return: ~ (`string`) @@ -4177,6 +4206,21 @@ getscriptinfo([{opts}]) *getscriptinfo()* Return: ~ (`vim.fn.getscriptinfo.ret[]`) +getstacktrace() *getstacktrace()* + Returns the current stack trace of Vim scripts. + Stack trace is a |List|, of which each item is a |Dictionary| + with the following items: + funcref The funcref if the stack is at a function, + otherwise this item is omitted. + event The string of the event description if the + stack is at an autocmd event, otherwise this + item is omitted. + lnum The line number in the script on the stack. + filepath The file path of the script on the stack. + + Return: ~ + (`table[]`) + gettabinfo([{tabnr}]) *gettabinfo()* If {tabnr} is not specified, then information about all the tab pages is returned as a |List|. Each List item is a @@ -4299,7 +4343,7 @@ gettext({text}) *gettext()* • {text} (`string`) Return: ~ - (`any`) + (`string`) getwininfo([{winid}]) *getwininfo()* Returns information about windows as a |List| with Dictionaries. @@ -4315,6 +4359,8 @@ getwininfo([{winid}]) *getwininfo()* botline last complete displayed buffer line bufnr number of buffer in the window height window height (excluding winbar) + leftcol first column displayed; only used when + 'wrap' is off loclist 1 if showing a location list quickfix 1 if quickfix or location list window terminal 1 if a terminal window @@ -4465,7 +4511,7 @@ glob2regpat({string}) *glob2regpat()* • {string} (`string`) Return: ~ - (`any`) + (`string`) globpath({path}, {expr} [, {nosuf} [, {list} [, {allinks}]]]) *globpath()* Perform glob() for String {expr} on all directories in {path} @@ -4822,7 +4868,7 @@ iconv({string}, {from}, {to}) *iconv()* • {to} (`string`) Return: ~ - (`any`) + (`string`) id({expr}) *id()* Returns a |String| which is a unique identifier of the @@ -4845,7 +4891,7 @@ id({expr}) *id()* • {expr} (`any`) Return: ~ - (`any`) + (`string`) indent({lnum}) *indent()* The result is a Number, which is indent of line {lnum} in the @@ -4895,7 +4941,7 @@ index({object}, {expr} [, {start} [, {ic}]]) *index()* • {ic} (`boolean?`) Return: ~ - (`any`) + (`integer`) indexof({object}, {expr} [, {opts}]) *indexof()* Returns the index of an item in {object} where {expr} is @@ -4942,7 +4988,7 @@ indexof({object}, {expr} [, {opts}]) *indexof()* • {opts} (`table?`) Return: ~ - (`any`) + (`integer`) input({prompt} [, {text} [, {completion}]]) *input()* @@ -4952,7 +4998,7 @@ input({prompt} [, {text} [, {completion}]]) *input()* • {completion} (`string?`) Return: ~ - (`any`) + (`string`) input({opts}) The result is a String, which is whatever the user typed on @@ -5069,7 +5115,7 @@ input({opts}) • {opts} (`table`) Return: ~ - (`any`) + (`string`) inputlist({textlist}) *inputlist()* {textlist} must be a |List| of strings. This |List| is @@ -5101,7 +5147,7 @@ inputrestore() *inputrestore()* Returns TRUE when there is nothing to restore, FALSE otherwise. Return: ~ - (`any`) + (`integer`) inputsave() *inputsave()* Preserve typeahead (also from mappings) and clear it, so that @@ -5112,7 +5158,7 @@ inputsave() *inputsave()* Returns TRUE when out of memory, FALSE otherwise. Return: ~ - (`any`) + (`integer`) inputsecret({prompt} [, {text}]) *inputsecret()* This function acts much like the |input()| function with but @@ -5130,7 +5176,7 @@ inputsecret({prompt} [, {text}]) *inputsecret()* • {text} (`string?`) Return: ~ - (`any`) + (`string`) insert({object}, {item} [, {idx}]) *insert()* When {object} is a |List| or a |Blob| insert {item} at the start @@ -5181,10 +5227,10 @@ invert({expr}) *invert()* < Parameters: ~ - • {expr} (`number`) + • {expr} (`integer`) Return: ~ - (`any`) + (`integer`) isabsolutepath({path}) *isabsolutepath()* The result is a Number, which is |TRUE| when {path} is an @@ -5279,7 +5325,7 @@ items({dict}) *items()* the index. Parameters: ~ - • {dict} (`any`) + • {dict} (`table`) Return: ~ (`any`) @@ -5307,7 +5353,7 @@ jobresize({job}, {width}, {height}) *jobresize()* (`any`) jobstart({cmd} [, {opts}]) *jobstart()* - Note: Prefer |vim.system()| in Lua (unless using the `pty` option). + Note: Prefer |vim.system()| in Lua (unless using `rpc`, `pty`, or `term`). Spawns {cmd} as a job. If {cmd} is a List it runs directly (no 'shell'). @@ -5315,8 +5361,11 @@ jobstart({cmd} [, {opts}]) *jobstart()* call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}']) < (See |shell-unquoting| for details.) - Example: >vim - call jobstart('nvim -h', {'on_stdout':{j,d,e->append(line('.'),d)}}) + Example: start a job and handle its output: >vim + call jobstart(['nvim', '-h'], {'on_stdout':{j,d,e->append(line('.'),d)}}) +< + Example: start a job in a |terminal| connected to the current buffer: >vim + call jobstart(['nvim', '-h'], {'term':v:true}) < Returns |job-id| on success, 0 on invalid arguments (or job table is full), -1 if {cmd}[0] or 'shell' is not executable. @@ -5381,6 +5430,10 @@ jobstart({cmd} [, {opts}]) *jobstart()* stdin: (string) Either "pipe" (default) to connect the job's stdin to a channel or "null" to disconnect stdin. + term: (boolean) Spawns {cmd} in a new pseudo-terminal session + connected to the current (unmodified) buffer. Implies "pty". + Default "height" and "width" are set to the current window + dimensions. |jobstart()|. Defaults $TERM to "xterm-256color". width: (number) Width of the `pty` terminal. {opts} is passed as |self| dictionary to the callback; the @@ -5397,7 +5450,7 @@ jobstart({cmd} [, {opts}]) *jobstart()* • {opts} (`table?`) Return: ~ - (`any`) + (`integer`) jobstop({id}) *jobstop()* Stop |job-id| {id} by sending SIGTERM to the job process. If @@ -5413,7 +5466,7 @@ jobstop({id}) *jobstop()* • {id} (`integer`) Return: ~ - (`any`) + (`integer`) jobwait({jobs} [, {timeout}]) *jobwait()* Waits for jobs and their |on_exit| handlers to complete. @@ -5441,7 +5494,7 @@ jobwait({jobs} [, {timeout}]) *jobwait()* • {timeout} (`integer?`) Return: ~ - (`any`) + (`integer[]`) join({list} [, {sep}]) *join()* Join the items in {list} together into one String. @@ -5459,7 +5512,7 @@ join({list} [, {sep}]) *join()* • {sep} (`string?`) Return: ~ - (`any`) + (`string`) json_decode({expr}) *json_decode()* Convert {expr} from JSON object. Accepts |readfile()|-style @@ -5498,7 +5551,7 @@ json_encode({expr}) *json_encode()* • {expr} (`any`) Return: ~ - (`any`) + (`string`) keys({dict}) *keys()* Return a |List| with all the keys of {dict}. The |List| is in @@ -5508,7 +5561,7 @@ keys({dict}) *keys()* • {dict} (`table`) Return: ~ - (`any`) + (`string[]`) keytrans({string}) *keytrans()* Turn the internal byte representation of keys into a form that @@ -5521,7 +5574,7 @@ keytrans({string}) *keytrans()* • {string} (`string`) Return: ~ - (`any`) + (`string`) len({expr}) *len()* *E701* The result is a Number, which is the length of the argument. @@ -5535,10 +5588,10 @@ len({expr}) *len()* *E70 Otherwise an error is given and returns zero. Parameters: ~ - • {expr} (`any`) + • {expr} (`any[]`) Return: ~ - (`any`) + (`integer`) libcall({libname}, {funcname}, {argument}) *libcall()* *E364* *E368* Call function {funcname} in the run-time library {libname} @@ -5664,7 +5717,7 @@ lispindent({lnum}) *lispindent()* • {lnum} (`integer`) Return: ~ - (`any`) + (`integer`) list2blob({list}) *list2blob()* Return a Blob concatenating all the number values in {list}. @@ -5680,7 +5733,7 @@ list2blob({list}) *list2blob()* • {list} (`any[]`) Return: ~ - (`any`) + (`string`) list2str({list} [, {utf8}]) *list2str()* Convert each number in {list} to a character string can @@ -5703,14 +5756,14 @@ list2str({list} [, {utf8}]) *list2str()* • {utf8} (`boolean?`) Return: ~ - (`any`) + (`string`) localtime() *localtime()* Return the current time, measured as seconds since 1st Jan 1970. See also |strftime()|, |strptime()| and |getftime()|. Return: ~ - (`any`) + (`integer`) log({expr}) *log()* Return the natural logarithm (base e) of {expr} as a |Float|. @@ -5727,7 +5780,7 @@ log({expr}) *log()* • {expr} (`number`) Return: ~ - (`any`) + (`number`) log10({expr}) *log10()* Return the logarithm of Float {expr} to base 10 as a |Float|. @@ -5743,7 +5796,7 @@ log10({expr}) *log10()* • {expr} (`number`) Return: ~ - (`any`) + (`number`) luaeval({expr} [, {expr}]) *luaeval()* Evaluate Lua expression {expr} and return its result converted @@ -6290,7 +6343,7 @@ matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}]) *matchbufline()* • {buf} (`string|integer`) • {pat} (`string`) • {lnum} (`string|integer`) - • {end_} (`string|integer`) + • {end} (`string|integer`) • {dict} (`table?`) Return: ~ @@ -6565,7 +6618,7 @@ max({expr}) *max()* • {expr} (`any`) Return: ~ - (`any`) + (`number`) menu_get({path} [, {modes}]) *menu_get()* Returns a |List| of |Dictionaries| describing |menus| (defined @@ -6712,7 +6765,7 @@ min({expr}) *min()* • {expr} (`any`) Return: ~ - (`any`) + (`number`) mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E739* Create directory {name}. @@ -6760,7 +6813,7 @@ mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E73 • {prot} (`string?`) Return: ~ - (`any`) + (`integer`) mode([{expr}]) *mode()* Return a string that indicates the current mode. @@ -6935,7 +6988,7 @@ nextnonblank({lnum}) *nextnonblank()* • {lnum} (`integer`) Return: ~ - (`any`) + (`integer`) nr2char({expr} [, {utf8}]) *nr2char()* Return a string with a single character, which has the number @@ -6957,7 +7010,7 @@ nr2char({expr} [, {utf8}]) *nr2char()* • {utf8} (`boolean?`) Return: ~ - (`any`) + (`string`) nvim_...({...}) *nvim_...()* *E5555* *eval-api* Call nvim |api| functions. The type checking of arguments will @@ -7014,7 +7067,7 @@ pathshorten({path} [, {len}]) *pathshorten()* • {len} (`integer?`) Return: ~ - (`any`) + (`string`) perleval({expr}) *perleval()* Evaluate |perl| expression {expr} and return its result @@ -7054,7 +7107,7 @@ pow({x}, {y}) *pow()* • {y} (`number`) Return: ~ - (`any`) + (`number`) prevnonblank({lnum}) *prevnonblank()* Return the line number of the first line at or above {lnum} @@ -7069,7 +7122,7 @@ prevnonblank({lnum}) *prevnonblank()* • {lnum} (`integer`) Return: ~ - (`any`) + (`integer`) printf({fmt}, {expr1} ...) *printf()* Return a String with {fmt}, where "%" items are replaced by @@ -7731,11 +7784,11 @@ reduce({object}, {func} [, {initial}]) *reduce()* *E99 Parameters: ~ • {object} (`any`) - • {func} (`function`) + • {func} (`fun(accumulator: T, current: any): any`) • {initial} (`any?`) Return: ~ - (`any`) + (`T`) reg_executing() *reg_executing()* Returns the single letter name of the register being executed. @@ -7784,7 +7837,7 @@ reltime({start}, {end}) Parameters: ~ • {start} (`any?`) - • {end_} (`any?`) + • {end} (`any?`) Return: ~ (`any`) @@ -7845,7 +7898,7 @@ remove({list}, {idx}, {end}) Parameters: ~ • {list} (`any[]`) • {idx} (`integer`) - • {end_} (`integer?`) + • {end} (`integer?`) Return: ~ (`any`) @@ -7867,7 +7920,7 @@ remove({blob}, {idx}, {end}) Parameters: ~ • {blob} (`any`) • {idx} (`integer`) - • {end_} (`integer?`) + • {end} (`integer?`) Return: ~ (`any`) @@ -7899,7 +7952,7 @@ rename({from}, {to}) *rename()* • {to} (`string`) Return: ~ - (`any`) + (`integer`) repeat({expr}, {count}) *repeat()* Repeat {expr} {count} times and return the concatenated @@ -7935,7 +7988,7 @@ resolve({filename}) *resolve()* *E65 • {filename} (`string`) Return: ~ - (`any`) + (`string`) reverse({object}) *reverse()* Reverse the order of items in {object}. {object} can be a @@ -7949,10 +8002,10 @@ reverse({object}) *reverse()* < Parameters: ~ - • {object} (`any`) + • {object} (`T[]`) Return: ~ - (`any`) + (`T[]`) round({expr}) *round()* Round off {expr} to the nearest integral value and return it @@ -7972,7 +8025,7 @@ round({expr}) *round()* • {expr} (`number`) Return: ~ - (`any`) + (`number`) rpcnotify({channel}, {event} [, {args}...]) *rpcnotify()* Sends {event} to {channel} via |RPC| and returns immediately. @@ -7984,10 +8037,10 @@ rpcnotify({channel}, {event} [, {args}...]) *rpcnotify()* Parameters: ~ • {channel} (`integer`) • {event} (`string`) - • {args} (`any?`) + • {...} (`any`) Return: ~ - (`any`) + (`integer`) rpcrequest({channel}, {method} [, {args}...]) *rpcrequest()* Sends a request to {channel} to invoke {method} via @@ -7999,7 +8052,7 @@ rpcrequest({channel}, {method} [, {args}...]) *rpcrequest()* Parameters: ~ • {channel} (`integer`) • {method} (`string`) - • {args} (`any?`) + • {...} (`any`) Return: ~ (`any`) @@ -8031,7 +8084,7 @@ screenattr({row}, {col}) *screenattr()* • {col} (`integer`) Return: ~ - (`any`) + (`integer`) screenchar({row}, {col}) *screenchar()* The result is a Number, which is the character at position @@ -8048,7 +8101,7 @@ screenchar({row}, {col}) *screenchar()* • {col} (`integer`) Return: ~ - (`any`) + (`integer`) screenchars({row}, {col}) *screenchars()* The result is a |List| of Numbers. The first number is the same @@ -8062,7 +8115,7 @@ screenchars({row}, {col}) *screenchars()* • {col} (`integer`) Return: ~ - (`any`) + (`integer[]`) screencol() *screencol()* The result is a Number, which is the current screen column of @@ -8080,7 +8133,7 @@ screencol() *screencol()* < Return: ~ - (`any`) + (`integer[]`) screenpos({winid}, {lnum}, {col}) *screenpos()* The result is a Dict with the screen position of the text @@ -8123,7 +8176,7 @@ screenrow() *screenrow()* Note: Same restrictions as with |screencol()|. Return: ~ - (`any`) + (`integer`) screenstring({row}, {col}) *screenstring()* The result is a String that contains the base character and @@ -8138,7 +8191,7 @@ screenstring({row}, {col}) *screenstring()* • {col} (`integer`) Return: ~ - (`any`) + (`string`) search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]]) *search()* Search for regexp pattern {pattern}. The search starts at the @@ -8253,7 +8306,7 @@ search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]]) *search()* • {skip} (`string|function?`) Return: ~ - (`any`) + (`integer`) searchcount([{options}]) *searchcount()* Get or update the last search count, like what is displayed @@ -8498,7 +8551,7 @@ searchpair({start}, {middle}, {end} [, {flags} [, {skip} [, {stopline} [, {timeo Parameters: ~ • {start} (`string`) • {middle} (`string`) - • {end_} (`string`) + • {end} (`string`) • {flags} (`string?`) • {skip} (`string|function?`) • {stopline} (`integer?`) @@ -8522,7 +8575,7 @@ searchpairpos({start}, {middle}, {end} [, {flags} [, {skip} [, {stopline} [, {ti Parameters: ~ • {start} (`string`) • {middle} (`string`) - • {end_} (`string`) + • {end} (`string`) • {flags} (`string?`) • {skip} (`string|function?`) • {stopline} (`integer?`) @@ -8565,7 +8618,7 @@ serverlist() *serverlist()* < Return: ~ - (`any`) + (`string[]`) serverstart([{address}]) *serverstart()* Opens a socket or named pipe at {address} and listens for @@ -8605,7 +8658,7 @@ serverstart([{address}]) *serverstart()* • {address} (`string?`) Return: ~ - (`any`) + (`string`) serverstop({address}) *serverstop()* Closes the pipe or socket at {address}. @@ -8617,7 +8670,7 @@ serverstop({address}) *serverstop()* • {address} (`string`) Return: ~ - (`any`) + (`integer`) setbufline({buf}, {lnum}, {text}) *setbufline()* Set line {lnum} to {text} in buffer {buf}. This works like @@ -8650,7 +8703,7 @@ setbufline({buf}, {lnum}, {text}) *setbufline()* • {text} (`string|string[]`) Return: ~ - (`any`) + (`integer`) setbufvar({buf}, {varname}, {val}) *setbufvar()* Set option or local variable {varname} in buffer {buf} to @@ -8770,7 +8823,7 @@ setcmdline({str} [, {pos}]) *setcmdline()* • {pos} (`integer?`) Return: ~ - (`any`) + (`integer`) setcmdpos({pos}) *setcmdpos()* Set the cursor position in the command line to byte position @@ -9102,7 +9155,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()* • {what} (`vim.fn.setqflist.what?`) Return: ~ - (`any`) + (`integer`) setreg({regname}, {value} [, {options}]) *setreg()* Set the register {regname} to {value}. @@ -9273,7 +9326,7 @@ sha256({string}) *sha256()* • {string} (`string`) Return: ~ - (`any`) + (`string`) shellescape({string} [, {special}]) *shellescape()* Escape {string} for use as a shell command argument. @@ -9312,7 +9365,7 @@ shellescape({string} [, {special}]) *shellescape()* • {special} (`boolean?`) Return: ~ - (`any`) + (`string`) shiftwidth([{col}]) *shiftwidth()* Returns the effective value of 'shiftwidth'. This is the @@ -9790,7 +9843,7 @@ simplify({filename}) *simplify()* • {filename} (`string`) Return: ~ - (`any`) + (`string`) sin({expr}) *sin()* Return the sine of {expr}, measured in radians, as a |Float|. @@ -9806,7 +9859,7 @@ sin({expr}) *sin()* • {expr} (`number`) Return: ~ - (`any`) + (`number`) sinh({expr}) *sinh()* Return the hyperbolic sine of {expr} as a |Float| in the range @@ -9838,7 +9891,7 @@ slice({expr}, {start} [, {end}]) *slice()* Parameters: ~ • {expr} (`any`) • {start} (`integer`) - • {end_} (`integer?`) + • {end} (`integer?`) Return: ~ (`any`) @@ -9950,12 +10003,12 @@ sort({list} [, {how} [, {dict}]]) *sort()* *E70 < Parameters: ~ - • {list} (`any`) + • {list} (`T[]`) • {how} (`string|function?`) • {dict} (`any?`) Return: ~ - (`any`) + (`T[]`) soundfold({word}) *soundfold()* Return the sound-folded equivalent of {word}. Uses the first @@ -9969,7 +10022,7 @@ soundfold({word}) *soundfold()* • {word} (`string`) Return: ~ - (`any`) + (`string`) spellbadword([{sentence}]) *spellbadword()* Without argument: The result is the badly spelled word under @@ -10028,7 +10081,7 @@ spellsuggest({word} [, {max} [, {capital}]]) *spellsuggest()* • {capital} (`boolean?`) Return: ~ - (`any`) + (`string[]`) split({string} [, {pattern} [, {keepempty}]]) *split()* Make a |List| out of {string}. When {pattern} is omitted or @@ -10061,7 +10114,7 @@ split({string} [, {pattern} [, {keepempty}]]) *split()* • {keepempty} (`boolean?`) Return: ~ - (`any`) + (`string[]`) sqrt({expr}) *sqrt()* Return the non-negative square root of Float {expr} as a @@ -10232,6 +10285,7 @@ str2list({string} [, {utf8}]) *str2list()* and exists only for backwards-compatibility. With UTF-8 composing characters are handled properly: >vim echo str2list("á") " returns [97, 769] +< Parameters: ~ • {string} (`string`) @@ -11165,28 +11219,6 @@ tempname() *tempname()* Return: ~ (`string`) -termopen({cmd} [, {opts}]) *termopen()* - Spawns {cmd} in a new pseudo-terminal session connected - to the current (unmodified) buffer. Parameters and behavior - are the same as |jobstart()| except "pty", "width", "height", - and "TERM" are ignored: "height" and "width" are taken from - the current window. Note that termopen() implies a "pty" arg - to jobstart(), and thus has the implications documented at - |jobstart()|. - - Returns the same values as jobstart(). - - Terminal environment is initialized as in |jobstart-env|, - except $TERM is set to "xterm-256color". Full behavior is - described in |terminal|. - - Parameters: ~ - • {cmd} (`string|string[]`) - • {opts} (`table?`) - - Return: ~ - (`any`) - test_garbagecollect_now() *test_garbagecollect_now()* Like |garbagecollect()|, but executed right away. This must only be called directly to avoid any structure to exist @@ -11646,7 +11678,7 @@ virtcol2col({winid}, {lnum}, {col}) *virtcol2col()* • {col} (`integer`) Return: ~ - (`any`) + (`integer`) visualmode([{expr}]) *visualmode()* The result is a String, which describes the last Visual mode @@ -11670,7 +11702,7 @@ visualmode([{expr}]) *visualmode()* • {expr} (`boolean?`) Return: ~ - (`any`) + (`string`) wait({timeout}, {condition} [, {interval}]) *wait()* Waits until {condition} evaluates to |TRUE|, where {condition} @@ -11812,7 +11844,7 @@ win_id2win({expr}) *win_id2win()* • {expr} (`integer`) Return: ~ - (`any`) + (`integer`) win_move_separator({nr}, {offset}) *win_move_separator()* Move window {nr}'s vertical separator (i.e., the right border) @@ -11989,7 +12021,7 @@ winlayout([{tabnr}]) *winlayout()* • {tabnr} (`integer?`) Return: ~ - (`any`) + (`any[]`) winline() *winline()* The result is a Number, which is the screen line of the cursor @@ -12037,7 +12069,7 @@ winnr([{arg}]) *winnr()* • {arg} (`string|integer?`) Return: ~ - (`any`) + (`integer`) winrestcmd() *winrestcmd()* Returns a sequence of |:resize| commands that should restore @@ -12051,7 +12083,7 @@ winrestcmd() *winrestcmd()* < Return: ~ - (`any`) + (`string`) winrestview({dict}) *winrestview()* Uses the |Dictionary| returned by |winsaveview()| to restore @@ -12123,7 +12155,7 @@ winwidth({nr}) *winwidth()* • {nr} (`integer`) Return: ~ - (`any`) + (`integer`) wordcount() *wordcount()* The result is a dictionary of byte/chars/word statistics for @@ -12213,11 +12245,11 @@ xor({expr}, {expr}) *xor()* < Parameters: ~ - • {expr} (`number`) - • {expr1} (`number`) + • {expr} (`integer`) + • {expr1} (`integer`) Return: ~ - (`any`) + (`integer`) ============================================================================== 2. Matching a pattern in a String *string-match* |