mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge #8679 from justinmk/doc
This commit is contained in:
commit
44b4f8c6e9
@ -230,27 +230,27 @@ nvim_command({command}) *nvim_command()*
|
|||||||
On execution error: fails with VimL error, does not update
|
On execution error: fails with VimL error, does not update
|
||||||
v:errmsg.
|
v:errmsg.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{command} Ex-command string
|
{command} Ex-command string
|
||||||
|
|
||||||
nvim_get_hl_by_name({name}, {rgb}) *nvim_get_hl_by_name()*
|
nvim_get_hl_by_name({name}, {rgb}) *nvim_get_hl_by_name()*
|
||||||
Gets a highlight definition by name.
|
Gets a highlight definition by name.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{name} Highlight group name
|
{name} Highlight group name
|
||||||
{rgb} Export RGB colors
|
{rgb} Export RGB colors
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Highlight definition map
|
Highlight definition map
|
||||||
|
|
||||||
nvim_get_hl_by_id({hl_id}, {rgb}) *nvim_get_hl_by_id()*
|
nvim_get_hl_by_id({hl_id}, {rgb}) *nvim_get_hl_by_id()*
|
||||||
Gets a highlight definition by id. |hlID()|
|
Gets a highlight definition by id. |hlID()|
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{hl_id} Highlight id as returned by |hlID()|
|
{hl_id} Highlight id as returned by |hlID()|
|
||||||
{rgb} Export RGB colors
|
{rgb} Export RGB colors
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Highlight definition map
|
Highlight definition map
|
||||||
|
|
||||||
nvim_feedkeys({keys}, {mode}, {escape_csi}) *nvim_feedkeys()*
|
nvim_feedkeys({keys}, {mode}, {escape_csi}) *nvim_feedkeys()*
|
||||||
@ -260,7 +260,7 @@ nvim_feedkeys({keys}, {mode}, {escape_csi}) *nvim_feedkeys()*
|
|||||||
|
|
||||||
On execution error: does not fail, but updates v:errmsg.
|
On execution error: does not fail, but updates v:errmsg.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{keys} to be typed
|
{keys} to be typed
|
||||||
{mode} behavior flags, see |feedkeys()|
|
{mode} behavior flags, see |feedkeys()|
|
||||||
{escape_csi} If true, escape K_SPECIAL/CSI bytes in
|
{escape_csi} If true, escape K_SPECIAL/CSI bytes in
|
||||||
@ -277,13 +277,13 @@ nvim_input({keys}) *nvim_input()*
|
|||||||
|keycodes| like <CR> are translated, so "<" is special. To
|
|keycodes| like <CR> are translated, so "<" is special. To
|
||||||
input a literal "<", send <LT>.
|
input a literal "<", send <LT>.
|
||||||
|
|
||||||
Attributes:~
|
Attributes: ~
|
||||||
{async}
|
{async}
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{keys} to be typed
|
{keys} to be typed
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Number of bytes actually written (can be fewer than
|
Number of bytes actually written (can be fewer than
|
||||||
requested if the buffer becomes full).
|
requested if the buffer becomes full).
|
||||||
|
|
||||||
@ -292,7 +292,7 @@ nvim_replace_termcodes({str}, {from_part}, {do_lt}, {special})
|
|||||||
Replaces terminal codes and |keycodes| (<CR>, <Esc>, ...) in a
|
Replaces terminal codes and |keycodes| (<CR>, <Esc>, ...) in a
|
||||||
string with the internal representation.
|
string with the internal representation.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{str} String to be converted.
|
{str} String to be converted.
|
||||||
{from_part} Legacy Vim parameter. Usually true.
|
{from_part} Legacy Vim parameter. Usually true.
|
||||||
{do_lt} Also translate <lt>. Ignored if `special` is
|
{do_lt} Also translate <lt>. Ignored if `special` is
|
||||||
@ -307,7 +307,7 @@ nvim_command_output({command}) *nvim_command_output()*
|
|||||||
On execution error: fails with VimL error, does not update
|
On execution error: fails with VimL error, does not update
|
||||||
v:errmsg.
|
v:errmsg.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{command} Ex-command string
|
{command} Ex-command string
|
||||||
|
|
||||||
nvim_eval({expr}) *nvim_eval()*
|
nvim_eval({expr}) *nvim_eval()*
|
||||||
@ -317,10 +317,10 @@ nvim_eval({expr}) *nvim_eval()*
|
|||||||
On execution error: fails with VimL error, does not update
|
On execution error: fails with VimL error, does not update
|
||||||
v:errmsg.
|
v:errmsg.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{expr} VimL expression string
|
{expr} VimL expression string
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Evaluation result or expanded object
|
Evaluation result or expanded object
|
||||||
|
|
||||||
nvim_execute_lua({code}, {args}) *nvim_execute_lua()*
|
nvim_execute_lua({code}, {args}) *nvim_execute_lua()*
|
||||||
@ -330,11 +330,11 @@ nvim_execute_lua({code}, {args}) *nvim_execute_lua()*
|
|||||||
Only statements are executed. To evaluate an expression,
|
Only statements are executed. To evaluate an expression,
|
||||||
prefix it with `return`: return my_function(...)
|
prefix it with `return`: return my_function(...)
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{code} lua code to execute
|
{code} lua code to execute
|
||||||
{args} Arguments to the code
|
{args} Arguments to the code
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Return value of lua code if present or NIL.
|
Return value of lua code if present or NIL.
|
||||||
|
|
||||||
nvim_call_function({fn}, {args}) *nvim_call_function()*
|
nvim_call_function({fn}, {args}) *nvim_call_function()*
|
||||||
@ -343,11 +343,11 @@ nvim_call_function({fn}, {args}) *nvim_call_function()*
|
|||||||
On execution error: fails with VimL error, does not update
|
On execution error: fails with VimL error, does not update
|
||||||
v:errmsg.
|
v:errmsg.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{fn} Function to call
|
{fn} Function to call
|
||||||
{args} Function arguments packed in an Array
|
{args} Function arguments packed in an Array
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Result of the function call
|
Result of the function call
|
||||||
|
|
||||||
nvim_call_dict_function({dict}, {fn}, {args}) *nvim_call_dict_function()*
|
nvim_call_dict_function({dict}, {fn}, {args}) *nvim_call_dict_function()*
|
||||||
@ -356,100 +356,100 @@ nvim_call_dict_function({dict}, {fn}, {args}) *nvim_call_dict_function()*
|
|||||||
On execution error: fails with VimL error, does not update
|
On execution error: fails with VimL error, does not update
|
||||||
v:errmsg.
|
v:errmsg.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{dict} Dictionary, or String evaluating to a VimL |self|
|
{dict} Dictionary, or String evaluating to a VimL |self|
|
||||||
dict
|
dict
|
||||||
{fn} Name of the function defined on the VimL dict
|
{fn} Name of the function defined on the VimL dict
|
||||||
{args} Function arguments packed in an Array
|
{args} Function arguments packed in an Array
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Result of the function call
|
Result of the function call
|
||||||
|
|
||||||
nvim_strwidth({text}) *nvim_strwidth()*
|
nvim_strwidth({text}) *nvim_strwidth()*
|
||||||
Calculates the number of display cells occupied by `text`.
|
Calculates the number of display cells occupied by `text`.
|
||||||
<Tab> counts as one cell.
|
<Tab> counts as one cell.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{text} Some text
|
{text} Some text
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Number of cells
|
Number of cells
|
||||||
|
|
||||||
nvim_list_runtime_paths() *nvim_list_runtime_paths()*
|
nvim_list_runtime_paths() *nvim_list_runtime_paths()*
|
||||||
Gets the paths contained in 'runtimepath'.
|
Gets the paths contained in 'runtimepath'.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
List of paths
|
List of paths
|
||||||
|
|
||||||
nvim_set_current_dir({dir}) *nvim_set_current_dir()*
|
nvim_set_current_dir({dir}) *nvim_set_current_dir()*
|
||||||
Changes the global working directory.
|
Changes the global working directory.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{dir} Directory path
|
{dir} Directory path
|
||||||
|
|
||||||
nvim_get_current_line() *nvim_get_current_line()*
|
nvim_get_current_line() *nvim_get_current_line()*
|
||||||
Gets the current line
|
Gets the current line
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Current line string
|
Current line string
|
||||||
|
|
||||||
nvim_set_current_line({line}) *nvim_set_current_line()*
|
nvim_set_current_line({line}) *nvim_set_current_line()*
|
||||||
Sets the current line
|
Sets the current line
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{line} Line contents
|
{line} Line contents
|
||||||
|
|
||||||
nvim_del_current_line() *nvim_del_current_line()*
|
nvim_del_current_line() *nvim_del_current_line()*
|
||||||
Deletes the current line
|
Deletes the current line
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
|
|
||||||
nvim_get_var({name}) *nvim_get_var()*
|
nvim_get_var({name}) *nvim_get_var()*
|
||||||
Gets a global (g:) variable
|
Gets a global (g:) variable
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Variable value
|
Variable value
|
||||||
|
|
||||||
nvim_set_var({name}, {value}) *nvim_set_var()*
|
nvim_set_var({name}, {value}) *nvim_set_var()*
|
||||||
Sets a global (g:) variable
|
Sets a global (g:) variable
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
{value} Variable value
|
{value} Variable value
|
||||||
|
|
||||||
nvim_del_var({name}) *nvim_del_var()*
|
nvim_del_var({name}) *nvim_del_var()*
|
||||||
Removes a global (g:) variable
|
Removes a global (g:) variable
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
|
|
||||||
nvim_get_vvar({name}) *nvim_get_vvar()*
|
nvim_get_vvar({name}) *nvim_get_vvar()*
|
||||||
Gets a v: variable
|
Gets a v: variable
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Variable value
|
Variable value
|
||||||
|
|
||||||
nvim_get_option({name}) *nvim_get_option()*
|
nvim_get_option({name}) *nvim_get_option()*
|
||||||
Gets an option value string
|
Gets an option value string
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{name} Option name
|
{name} Option name
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Option value (global)
|
Option value (global)
|
||||||
|
|
||||||
nvim_set_option({name}, {value}) *nvim_set_option()*
|
nvim_set_option({name}, {value}) *nvim_set_option()*
|
||||||
Sets an option value
|
Sets an option value
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{name} Option name
|
{name} Option name
|
||||||
{value} New option value
|
{value} New option value
|
||||||
|
|
||||||
@ -458,7 +458,7 @@ nvim_out_write({str}) *nvim_out_write()*
|
|||||||
"\n", the message is buffered (won't display) until a linefeed
|
"\n", the message is buffered (won't display) until a linefeed
|
||||||
is written.
|
is written.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{str} Message
|
{str} Message
|
||||||
|
|
||||||
nvim_err_write({str}) *nvim_err_write()*
|
nvim_err_write({str}) *nvim_err_write()*
|
||||||
@ -466,80 +466,80 @@ nvim_err_write({str}) *nvim_err_write()*
|
|||||||
"\n", the message is buffered (won't display) until a linefeed
|
"\n", the message is buffered (won't display) until a linefeed
|
||||||
is written.
|
is written.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{str} Message
|
{str} Message
|
||||||
|
|
||||||
nvim_err_writeln({str}) *nvim_err_writeln()*
|
nvim_err_writeln({str}) *nvim_err_writeln()*
|
||||||
Writes a message to the Vim error buffer. Appends "\n", so the
|
Writes a message to the Vim error buffer. Appends "\n", so the
|
||||||
buffer is flushed (and displayed).
|
buffer is flushed (and displayed).
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{str} Message
|
{str} Message
|
||||||
|
|
||||||
nvim_list_bufs() *nvim_list_bufs()*
|
nvim_list_bufs() *nvim_list_bufs()*
|
||||||
Gets the current list of buffer handles
|
Gets the current list of buffer handles
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
List of buffer handles
|
List of buffer handles
|
||||||
|
|
||||||
nvim_get_current_buf() *nvim_get_current_buf()*
|
nvim_get_current_buf() *nvim_get_current_buf()*
|
||||||
Gets the current buffer
|
Gets the current buffer
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Buffer handle
|
Buffer handle
|
||||||
|
|
||||||
nvim_set_current_buf({buffer}) *nvim_set_current_buf()*
|
nvim_set_current_buf({buffer}) *nvim_set_current_buf()*
|
||||||
Sets the current buffer
|
Sets the current buffer
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
|
|
||||||
nvim_list_wins() *nvim_list_wins()*
|
nvim_list_wins() *nvim_list_wins()*
|
||||||
Gets the current list of window handles
|
Gets the current list of window handles
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
List of window handles
|
List of window handles
|
||||||
|
|
||||||
nvim_get_current_win() *nvim_get_current_win()*
|
nvim_get_current_win() *nvim_get_current_win()*
|
||||||
Gets the current window
|
Gets the current window
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Window handle
|
Window handle
|
||||||
|
|
||||||
nvim_set_current_win({window}) *nvim_set_current_win()*
|
nvim_set_current_win({window}) *nvim_set_current_win()*
|
||||||
Sets the current window
|
Sets the current window
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
|
|
||||||
nvim_list_tabpages() *nvim_list_tabpages()*
|
nvim_list_tabpages() *nvim_list_tabpages()*
|
||||||
Gets the current list of tabpage handles
|
Gets the current list of tabpage handles
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
List of tabpage handles
|
List of tabpage handles
|
||||||
|
|
||||||
nvim_get_current_tabpage() *nvim_get_current_tabpage()*
|
nvim_get_current_tabpage() *nvim_get_current_tabpage()*
|
||||||
Gets the current tabpage
|
Gets the current tabpage
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Tabpage handle
|
Tabpage handle
|
||||||
|
|
||||||
nvim_set_current_tabpage({tabpage}) *nvim_set_current_tabpage()*
|
nvim_set_current_tabpage({tabpage}) *nvim_set_current_tabpage()*
|
||||||
Sets the current tabpage
|
Sets the current tabpage
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{tabpage} Tabpage handle
|
{tabpage} Tabpage handle
|
||||||
|
|
||||||
nvim_subscribe({event}) *nvim_subscribe()*
|
nvim_subscribe({event}) *nvim_subscribe()*
|
||||||
Subscribes to event broadcasts
|
Subscribes to event broadcasts
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{event} Event type string
|
{event} Event type string
|
||||||
|
|
||||||
nvim_unsubscribe({event}) *nvim_unsubscribe()*
|
nvim_unsubscribe({event}) *nvim_unsubscribe()*
|
||||||
Unsubscribes to event broadcasts
|
Unsubscribes to event broadcasts
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{event} Event type string
|
{event} Event type string
|
||||||
|
|
||||||
nvim_get_color_by_name({name}) *nvim_get_color_by_name()*
|
nvim_get_color_by_name({name}) *nvim_get_color_by_name()*
|
||||||
@ -552,20 +552,20 @@ nvim_get_mode() *nvim_get_mode()*
|
|||||||
Gets the current mode. |mode()| "blocking" is true if Nvim is
|
Gets the current mode. |mode()| "blocking" is true if Nvim is
|
||||||
waiting for input.
|
waiting for input.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Dictionary { "mode": String, "blocking": Boolean }
|
Dictionary { "mode": String, "blocking": Boolean }
|
||||||
|
|
||||||
Attributes:~
|
Attributes: ~
|
||||||
{async}
|
{async}
|
||||||
|
|
||||||
nvim_get_keymap({mode}) *nvim_get_keymap()*
|
nvim_get_keymap({mode}) *nvim_get_keymap()*
|
||||||
Gets a list of global (non-buffer-local) |mapping|
|
Gets a list of global (non-buffer-local) |mapping|
|
||||||
definitions.
|
definitions.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{mode} Mode short-name ("n", "i", "v", ...)
|
{mode} Mode short-name ("n", "i", "v", ...)
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Array of maparg()-like dictionaries describing mappings.
|
Array of maparg()-like dictionaries describing mappings.
|
||||||
The "buffer" key is always zero.
|
The "buffer" key is always zero.
|
||||||
|
|
||||||
@ -575,21 +575,21 @@ nvim_get_commands({opts}) *nvim_get_commands()*
|
|||||||
Currently only |user-commands| are supported, not builtin Ex
|
Currently only |user-commands| are supported, not builtin Ex
|
||||||
commands.
|
commands.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{opts} Optional parameters. Currently only supports
|
{opts} Optional parameters. Currently only supports
|
||||||
{"builtin":false}
|
{"builtin":false}
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Map of maps describing commands.
|
Map of maps describing commands.
|
||||||
|
|
||||||
nvim_get_api_info() *nvim_get_api_info()*
|
nvim_get_api_info() *nvim_get_api_info()*
|
||||||
Returns a 2-tuple (Array), where item 0 is the current channel
|
Returns a 2-tuple (Array), where item 0 is the current channel
|
||||||
id and item 1 is the |api-metadata| map (Dictionary).
|
id and item 1 is the |api-metadata| map (Dictionary).
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
2-tuple [{channel-id}, {api-metadata}]
|
2-tuple [{channel-id}, {api-metadata}]
|
||||||
|
|
||||||
Attributes:~
|
Attributes: ~
|
||||||
{async}
|
{async}
|
||||||
|
|
||||||
*nvim_set_client_info()*
|
*nvim_set_client_info()*
|
||||||
@ -601,7 +601,7 @@ nvim_set_client_info({name}, {version}, {type}, {methods},
|
|||||||
first identifies the channel, and a plugin using that library
|
first identifies the channel, and a plugin using that library
|
||||||
later overrides that info)
|
later overrides that info)
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{name} short name for the connected client
|
{name} short name for the connected client
|
||||||
{version} Dictionary describing the version, with the
|
{version} Dictionary describing the version, with the
|
||||||
following possible keys (all optional)
|
following possible keys (all optional)
|
||||||
@ -648,7 +648,7 @@ nvim_set_client_info({name}, {version}, {type}, {methods},
|
|||||||
nvim_get_chan_info({chan}) *nvim_get_chan_info()*
|
nvim_get_chan_info({chan}) *nvim_get_chan_info()*
|
||||||
Get information about a channel.
|
Get information about a channel.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
a Dictionary, describing a channel with the following
|
a Dictionary, describing a channel with the following
|
||||||
keys: "stream" the stream underlying the channel
|
keys: "stream" the stream underlying the channel
|
||||||
"stdio" stdin and stdout of this Nvim instance "stderr"
|
"stdio" stdin and stdout of this Nvim instance "stderr"
|
||||||
@ -660,7 +660,7 @@ nvim_get_chan_info({chan}) *nvim_get_chan_info()*
|
|||||||
nvim_list_chans() *nvim_list_chans()*
|
nvim_list_chans() *nvim_list_chans()*
|
||||||
Get information about all open channels.
|
Get information about all open channels.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Array of Dictionaries, each describing a channel with the
|
Array of Dictionaries, each describing a channel with the
|
||||||
format specified at |nvim_get_chan_info|.
|
format specified at |nvim_get_chan_info|.
|
||||||
|
|
||||||
@ -670,12 +670,12 @@ nvim_call_atomic({calls}) *nvim_call_atomic()*
|
|||||||
This has two main usages:
|
This has two main usages:
|
||||||
To perform several requests from an async context atomically, i.e. without interleaving redraws, RPC requests from other clients, or user interactions (however API methods may trigger autocommands or event processing which have such side-effects, e.g. |:sleep| may wake timers). To minimize RPC overhead (roundtrips) of a sequence of many requests.
|
To perform several requests from an async context atomically, i.e. without interleaving redraws, RPC requests from other clients, or user interactions (however API methods may trigger autocommands or event processing which have such side-effects, e.g. |:sleep| may wake timers). To minimize RPC overhead (roundtrips) of a sequence of many requests.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{calls} an array of calls, where each call is described
|
{calls} an array of calls, where each call is described
|
||||||
by an array with two elements: the request name,
|
by an array with two elements: the request name,
|
||||||
and an array of arguments.
|
and an array of arguments.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
an array with two elements. The first is an array of
|
an array with two elements. The first is an array of
|
||||||
return values. The second is NIL if all calls succeeded.
|
return values. The second is NIL if all calls succeeded.
|
||||||
If a call resulted in an error, it is a three-element
|
If a call resulted in an error, it is a three-element
|
||||||
@ -688,10 +688,10 @@ nvim_call_atomic({calls}) *nvim_call_atomic()*
|
|||||||
nvim_parse_expression({expr}, {flags}, {highlight})
|
nvim_parse_expression({expr}, {flags}, {highlight})
|
||||||
Parse a VimL expression
|
Parse a VimL expression
|
||||||
|
|
||||||
Attributes:~
|
Attributes: ~
|
||||||
{async}
|
{async}
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{expr} Expression to parse. Is always treated as a
|
{expr} Expression to parse. Is always treated as a
|
||||||
single line.
|
single line.
|
||||||
{flags} Flags: - "m" if multiple expressions in a
|
{flags} Flags: - "m" if multiple expressions in a
|
||||||
@ -715,7 +715,7 @@ nvim_parse_expression({expr}, {flags}, {highlight})
|
|||||||
exclusive: one should highlight region
|
exclusive: one should highlight region
|
||||||
[start_col, end_col)).
|
[start_col, end_col)).
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
AST: top-level dictionary with these keys: "error":
|
AST: top-level dictionary with these keys: "error":
|
||||||
Dictionary with error, present only if parser saw some
|
Dictionary with error, present only if parser saw some
|
||||||
error. Contains the following keys: "message": String,
|
error. Contains the following keys: "message": String,
|
||||||
@ -768,10 +768,10 @@ nvim__id({obj}) *nvim__id()*
|
|||||||
This API function is used for testing. One should not rely on
|
This API function is used for testing. One should not rely on
|
||||||
its presence in plugins.
|
its presence in plugins.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{obj} Object to return.
|
{obj} Object to return.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
its argument.
|
its argument.
|
||||||
|
|
||||||
nvim__id_array({arr}) *nvim__id_array()*
|
nvim__id_array({arr}) *nvim__id_array()*
|
||||||
@ -780,10 +780,10 @@ nvim__id_array({arr}) *nvim__id_array()*
|
|||||||
This API function is used for testing. One should not rely on
|
This API function is used for testing. One should not rely on
|
||||||
its presence in plugins.
|
its presence in plugins.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{arr} Array to return.
|
{arr} Array to return.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
its argument.
|
its argument.
|
||||||
|
|
||||||
nvim__id_dictionary({dct}) *nvim__id_dictionary()*
|
nvim__id_dictionary({dct}) *nvim__id_dictionary()*
|
||||||
@ -792,10 +792,10 @@ nvim__id_dictionary({dct}) *nvim__id_dictionary()*
|
|||||||
This API function is used for testing. One should not rely on
|
This API function is used for testing. One should not rely on
|
||||||
its presence in plugins.
|
its presence in plugins.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{dct} Dictionary to return.
|
{dct} Dictionary to return.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
its argument.
|
its argument.
|
||||||
|
|
||||||
nvim__id_float({flt}) *nvim__id_float()*
|
nvim__id_float({flt}) *nvim__id_float()*
|
||||||
@ -804,22 +804,22 @@ nvim__id_float({flt}) *nvim__id_float()*
|
|||||||
This API function is used for testing. One should not rely on
|
This API function is used for testing. One should not rely on
|
||||||
its presence in plugins.
|
its presence in plugins.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{flt} Value to return.
|
{flt} Value to return.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
its argument.
|
its argument.
|
||||||
|
|
||||||
nvim__stats() *nvim__stats()*
|
nvim__stats() *nvim__stats()*
|
||||||
Gets internal stats.
|
Gets internal stats.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Map of various internal stats.
|
Map of various internal stats.
|
||||||
|
|
||||||
nvim_list_uis() *nvim_list_uis()*
|
nvim_list_uis() *nvim_list_uis()*
|
||||||
Gets a list of dictionaries representing attached UIs.
|
Gets a list of dictionaries representing attached UIs.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Array of UI dictionaries
|
Array of UI dictionaries
|
||||||
Each dictionary has the following keys:
|
Each dictionary has the following keys:
|
||||||
"height" requested height of the UI "width" requested width of the UI "rgb" whether the UI uses rgb colors (false implies cterm colors) "ext_..." Requested UI extensions, see |ui-options| "chan" Channel id of remote UI (not present for TUI)
|
"height" requested height of the UI "width" requested width of the UI "rgb" whether the UI uses rgb colors (false implies cterm colors) "ext_..." Requested UI extensions, see |ui-options| "chan" Channel id of remote UI (not present for TUI)
|
||||||
@ -827,13 +827,13 @@ nvim_list_uis() *nvim_list_uis()*
|
|||||||
nvim_get_proc_children({pid}) *nvim_get_proc_children()*
|
nvim_get_proc_children({pid}) *nvim_get_proc_children()*
|
||||||
Gets the immediate children of process `pid`.
|
Gets the immediate children of process `pid`.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Array of child process ids, empty if process not found.
|
Array of child process ids, empty if process not found.
|
||||||
|
|
||||||
nvim_get_proc({pid}) *nvim_get_proc()*
|
nvim_get_proc({pid}) *nvim_get_proc()*
|
||||||
Gets info describing process `pid`.
|
Gets info describing process `pid`.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Map of process properties, or NIL if process not found.
|
Map of process properties, or NIL if process not found.
|
||||||
|
|
||||||
|
|
||||||
@ -843,16 +843,16 @@ Buffer Functions *api-buffer*
|
|||||||
nvim_buf_line_count({buffer}) *nvim_buf_line_count()*
|
nvim_buf_line_count({buffer}) *nvim_buf_line_count()*
|
||||||
Gets the buffer line count
|
Gets the buffer line count
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Line count
|
Line count
|
||||||
|
|
||||||
nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()*
|
nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()*
|
||||||
Activate updates from this buffer to the current channel.
|
Activate updates from this buffer to the current channel.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} The buffer handle
|
{buffer} The buffer handle
|
||||||
{send_buffer} Set to true if the initial notification
|
{send_buffer} Set to true if the initial notification
|
||||||
should contain the whole buffer. If so, the
|
should contain the whole buffer. If so, the
|
||||||
@ -862,7 +862,7 @@ nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()*
|
|||||||
`nvim_buf_changedtick_event`
|
`nvim_buf_changedtick_event`
|
||||||
{opts} Optional parameters. Currently not used.
|
{opts} Optional parameters. Currently not used.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
False when updates couldn't be enabled because the buffer
|
False when updates couldn't be enabled because the buffer
|
||||||
isn't loaded or optscontained an invalid key; otherwise
|
isn't loaded or optscontained an invalid key; otherwise
|
||||||
True.
|
True.
|
||||||
@ -870,52 +870,52 @@ nvim_buf_attach({buffer}, {send_buffer}, {opts}) *nvim_buf_attach()*
|
|||||||
nvim_buf_detach({buffer}) *nvim_buf_detach()*
|
nvim_buf_detach({buffer}) *nvim_buf_detach()*
|
||||||
Deactivate updates from this buffer to the current channel.
|
Deactivate updates from this buffer to the current channel.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} The buffer handle
|
{buffer} The buffer handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
False when updates couldn't be disabled because the buffer
|
False when updates couldn't be disabled because the buffer
|
||||||
isn't loaded; otherwise True.
|
isn't loaded; otherwise True.
|
||||||
|
|
||||||
*nvim_buf_get_lines()*
|
*nvim_buf_get_lines()*
|
||||||
nvim_buf_get_lines({buffer}, {start}, {end}, {strict_indexing})
|
nvim_buf_get_lines({buffer}, {start}, {end}, {strict_indexing})
|
||||||
Retrieves a line range from the buffer
|
Gets a line-range from the buffer.
|
||||||
|
|
||||||
Indexing is zero-based, end-exclusive. Negative indices are
|
Indexing is zero-based, end-exclusive. Negative indices are
|
||||||
interpreted as length+1+index, i e -1 refers to the index past
|
interpreted as length+1+index: -1 refers to the index past the
|
||||||
the end. So to get the last element set start=-2 and end=-1.
|
end. So to get the last element use start=-2 and end=-1.
|
||||||
|
|
||||||
Out-of-bounds indices are clamped to the nearest valid value,
|
Out-of-bounds indices are clamped to the nearest valid value,
|
||||||
unless `strict_indexing` is set.
|
unless `strict_indexing` is set.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
{start} First line index
|
{start} First line index
|
||||||
{end} Last line index (exclusive)
|
{end} Last line index (exclusive)
|
||||||
{strict_indexing} Whether out-of-bounds should be an
|
{strict_indexing} Whether out-of-bounds should be an
|
||||||
error.
|
error.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Array of lines
|
Array of lines
|
||||||
|
|
||||||
*nvim_buf_set_lines()*
|
*nvim_buf_set_lines()*
|
||||||
nvim_buf_set_lines({buffer}, {start}, {end}, {strict_indexing},
|
nvim_buf_set_lines({buffer}, {start}, {end}, {strict_indexing},
|
||||||
{replacement})
|
{replacement})
|
||||||
Replaces line range on the buffer
|
Sets (replaces) a line-range in the buffer.
|
||||||
|
|
||||||
Indexing is zero-based, end-exclusive. Negative indices are
|
Indexing is zero-based, end-exclusive. Negative indices are
|
||||||
interpreted as length+1+index, i e -1 refers to the index past
|
interpreted as length+1+index: -1 refers to the index past the
|
||||||
the end. So to change or delete the last element set start=-2
|
end. So to change or delete the last element use start=-2 and
|
||||||
and end=-1.
|
end=-1.
|
||||||
|
|
||||||
To insert lines at a given index, set both start and end to
|
To insert lines at a given index, set `start` and `end` to the
|
||||||
the same index. To delete a range of lines, set replacement to
|
same index. To delete a range of lines, set `replacement` to
|
||||||
an empty array.
|
an empty array.
|
||||||
|
|
||||||
Out-of-bounds indices are clamped to the nearest valid value,
|
Out-of-bounds indices are clamped to the nearest valid value,
|
||||||
unless `strict_indexing` is set.
|
unless `strict_indexing` is set.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
{start} First line index
|
{start} First line index
|
||||||
{end} Last line index (exclusive)
|
{end} Last line index (exclusive)
|
||||||
@ -926,47 +926,47 @@ nvim_buf_set_lines({buffer}, {start}, {end}, {strict_indexing},
|
|||||||
nvim_buf_get_var({buffer}, {name}) *nvim_buf_get_var()*
|
nvim_buf_get_var({buffer}, {name}) *nvim_buf_get_var()*
|
||||||
Gets a buffer-scoped (b:) variable.
|
Gets a buffer-scoped (b:) variable.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Variable value
|
Variable value
|
||||||
|
|
||||||
nvim_buf_get_changedtick({buffer}) *nvim_buf_get_changedtick()*
|
nvim_buf_get_changedtick({buffer}) *nvim_buf_get_changedtick()*
|
||||||
Gets a changed tick of a buffer
|
Gets a changed tick of a buffer
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle.
|
{buffer} Buffer handle.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
b:changedtickvalue.
|
b:changedtickvalue.
|
||||||
|
|
||||||
nvim_buf_get_keymap({buffer}, {mode}) *nvim_buf_get_keymap()*
|
nvim_buf_get_keymap({buffer}, {mode}) *nvim_buf_get_keymap()*
|
||||||
Gets a list of buffer-local |mapping| definitions.
|
Gets a list of buffer-local |mapping| definitions.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{mode} Mode short-name ("n", "i", "v", ...)
|
{mode} Mode short-name ("n", "i", "v", ...)
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Array of maparg()-like dictionaries describing mappings.
|
Array of maparg()-like dictionaries describing mappings.
|
||||||
The "buffer" key holds the associated buffer handle.
|
The "buffer" key holds the associated buffer handle.
|
||||||
|
|
||||||
nvim_buf_get_commands({buffer}, {opts}) *nvim_buf_get_commands()*
|
nvim_buf_get_commands({buffer}, {opts}) *nvim_buf_get_commands()*
|
||||||
Gets a map of buffer-local |user-commands|.
|
Gets a map of buffer-local |user-commands|.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle.
|
{buffer} Buffer handle.
|
||||||
{opts} Optional parameters. Currently not used.
|
{opts} Optional parameters. Currently not used.
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Map of maps describing commands.
|
Map of maps describing commands.
|
||||||
|
|
||||||
nvim_buf_set_var({buffer}, {name}, {value}) *nvim_buf_set_var()*
|
nvim_buf_set_var({buffer}, {name}, {value}) *nvim_buf_set_var()*
|
||||||
Sets a buffer-scoped (b:) variable
|
Sets a buffer-scoped (b:) variable
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
{value} Variable value
|
{value} Variable value
|
||||||
@ -974,25 +974,25 @@ nvim_buf_set_var({buffer}, {name}, {value}) *nvim_buf_set_var()*
|
|||||||
nvim_buf_del_var({buffer}, {name}) *nvim_buf_del_var()*
|
nvim_buf_del_var({buffer}, {name}) *nvim_buf_del_var()*
|
||||||
Removes a buffer-scoped (b:) variable
|
Removes a buffer-scoped (b:) variable
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
|
|
||||||
nvim_buf_get_option({buffer}, {name}) *nvim_buf_get_option()*
|
nvim_buf_get_option({buffer}, {name}) *nvim_buf_get_option()*
|
||||||
Gets a buffer option value
|
Gets a buffer option value
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
{name} Option name
|
{name} Option name
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Option value
|
Option value
|
||||||
|
|
||||||
nvim_buf_set_option({buffer}, {name}, {value}) *nvim_buf_set_option()*
|
nvim_buf_set_option({buffer}, {name}, {value}) *nvim_buf_set_option()*
|
||||||
Sets a buffer option value. Passing 'nil' as value deletes the
|
Sets a buffer option value. Passing 'nil' as value deletes the
|
||||||
option (only works if there's a global fallback)
|
option (only works if there's a global fallback)
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
{name} Option name
|
{name} Option name
|
||||||
{value} Option value
|
{value} Option value
|
||||||
@ -1000,37 +1000,37 @@ nvim_buf_set_option({buffer}, {name}, {value}) *nvim_buf_set_option()*
|
|||||||
nvim_buf_get_name({buffer}) *nvim_buf_get_name()*
|
nvim_buf_get_name({buffer}) *nvim_buf_get_name()*
|
||||||
Gets the full file name for the buffer
|
Gets the full file name for the buffer
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Buffer name
|
Buffer name
|
||||||
|
|
||||||
nvim_buf_set_name({buffer}, {name}) *nvim_buf_set_name()*
|
nvim_buf_set_name({buffer}, {name}) *nvim_buf_set_name()*
|
||||||
Sets the full file name for a buffer
|
Sets the full file name for a buffer
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
{name} Buffer name
|
{name} Buffer name
|
||||||
|
|
||||||
nvim_buf_is_valid({buffer}) *nvim_buf_is_valid()*
|
nvim_buf_is_valid({buffer}) *nvim_buf_is_valid()*
|
||||||
Checks if a buffer is valid
|
Checks if a buffer is valid
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
true if the buffer is valid, false otherwise
|
true if the buffer is valid, false otherwise
|
||||||
|
|
||||||
nvim_buf_get_mark({buffer}, {name}) *nvim_buf_get_mark()*
|
nvim_buf_get_mark({buffer}, {name}) *nvim_buf_get_mark()*
|
||||||
Return a tuple (row,col) representing the position of the
|
Return a tuple (row,col) representing the position of the
|
||||||
named mark
|
named mark
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
{name} Mark name
|
{name} Mark name
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
(row, col) tuple
|
(row, col) tuple
|
||||||
|
|
||||||
*nvim_buf_add_highlight()*
|
*nvim_buf_add_highlight()*
|
||||||
@ -1059,7 +1059,7 @@ nvim_buf_add_highlight({buffer}, {src_id}, {hl_group}, {line},
|
|||||||
initialization, and later asynchronously add and clear
|
initialization, and later asynchronously add and clear
|
||||||
highlights in response to buffer changes.
|
highlights in response to buffer changes.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
{src_id} Source group to use or 0 to use a new group,
|
{src_id} Source group to use or 0 to use a new group,
|
||||||
or -1 for ungrouped highlight
|
or -1 for ungrouped highlight
|
||||||
@ -1070,7 +1070,7 @@ nvim_buf_add_highlight({buffer}, {src_id}, {hl_group}, {line},
|
|||||||
{col_end} End of (byte-indexed) column range to
|
{col_end} End of (byte-indexed) column range to
|
||||||
highlight, or -1 to highlight to end of line
|
highlight, or -1 to highlight to end of line
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
The src_id that was used
|
The src_id that was used
|
||||||
|
|
||||||
*nvim_buf_clear_highlight()*
|
*nvim_buf_clear_highlight()*
|
||||||
@ -1081,7 +1081,7 @@ nvim_buf_clear_highlight({buffer}, {src_id}, {line_start}, {line_end})
|
|||||||
To clear a source group in the entire buffer, pass in 0 and -1
|
To clear a source group in the entire buffer, pass in 0 and -1
|
||||||
to line_start and line_end respectively.
|
to line_start and line_end respectively.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{buffer} Buffer handle
|
{buffer} Buffer handle
|
||||||
{src_id} Highlight source group to clear, or -1 to
|
{src_id} Highlight source group to clear, or -1 to
|
||||||
clear all.
|
clear all.
|
||||||
@ -1096,76 +1096,76 @@ Window Functions *api-window*
|
|||||||
nvim_win_get_buf({window}) *nvim_win_get_buf()*
|
nvim_win_get_buf({window}) *nvim_win_get_buf()*
|
||||||
Gets the current buffer in a window
|
Gets the current buffer in a window
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Buffer handle
|
Buffer handle
|
||||||
|
|
||||||
nvim_win_get_cursor({window}) *nvim_win_get_cursor()*
|
nvim_win_get_cursor({window}) *nvim_win_get_cursor()*
|
||||||
Gets the cursor position in the window
|
Gets the cursor position in the window
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
(row, col) tuple
|
(row, col) tuple
|
||||||
|
|
||||||
nvim_win_set_cursor({window}, {pos}) *nvim_win_set_cursor()*
|
nvim_win_set_cursor({window}, {pos}) *nvim_win_set_cursor()*
|
||||||
Sets the cursor position in the window
|
Sets the cursor position in the window
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
{pos} (row, col) tuple representing the new position
|
{pos} (row, col) tuple representing the new position
|
||||||
|
|
||||||
nvim_win_get_height({window}) *nvim_win_get_height()*
|
nvim_win_get_height({window}) *nvim_win_get_height()*
|
||||||
Gets the window height
|
Gets the window height
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Height as a count of rows
|
Height as a count of rows
|
||||||
|
|
||||||
nvim_win_set_height({window}, {height}) *nvim_win_set_height()*
|
nvim_win_set_height({window}, {height}) *nvim_win_set_height()*
|
||||||
Sets the window height. This will only succeed if the screen
|
Sets the window height. This will only succeed if the screen
|
||||||
is split horizontally.
|
is split horizontally.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
{height} Height as a count of rows
|
{height} Height as a count of rows
|
||||||
|
|
||||||
nvim_win_get_width({window}) *nvim_win_get_width()*
|
nvim_win_get_width({window}) *nvim_win_get_width()*
|
||||||
Gets the window width
|
Gets the window width
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Width as a count of columns
|
Width as a count of columns
|
||||||
|
|
||||||
nvim_win_set_width({window}, {width}) *nvim_win_set_width()*
|
nvim_win_set_width({window}, {width}) *nvim_win_set_width()*
|
||||||
Sets the window width. This will only succeed if the screen is
|
Sets the window width. This will only succeed if the screen is
|
||||||
split vertically.
|
split vertically.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
{width} Width as a count of columns
|
{width} Width as a count of columns
|
||||||
|
|
||||||
nvim_win_get_var({window}, {name}) *nvim_win_get_var()*
|
nvim_win_get_var({window}, {name}) *nvim_win_get_var()*
|
||||||
Gets a window-scoped (w:) variable
|
Gets a window-scoped (w:) variable
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Variable value
|
Variable value
|
||||||
|
|
||||||
nvim_win_set_var({window}, {name}, {value}) *nvim_win_set_var()*
|
nvim_win_set_var({window}, {name}, {value}) *nvim_win_set_var()*
|
||||||
Sets a window-scoped (w:) variable
|
Sets a window-scoped (w:) variable
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
{value} Variable value
|
{value} Variable value
|
||||||
@ -1173,25 +1173,25 @@ nvim_win_set_var({window}, {name}, {value}) *nvim_win_set_var()*
|
|||||||
nvim_win_del_var({window}, {name}) *nvim_win_del_var()*
|
nvim_win_del_var({window}, {name}) *nvim_win_del_var()*
|
||||||
Removes a window-scoped (w:) variable
|
Removes a window-scoped (w:) variable
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
|
|
||||||
nvim_win_get_option({window}, {name}) *nvim_win_get_option()*
|
nvim_win_get_option({window}, {name}) *nvim_win_get_option()*
|
||||||
Gets a window option value
|
Gets a window option value
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
{name} Option name
|
{name} Option name
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Option value
|
Option value
|
||||||
|
|
||||||
nvim_win_set_option({window}, {name}, {value}) *nvim_win_set_option()*
|
nvim_win_set_option({window}, {name}, {value}) *nvim_win_set_option()*
|
||||||
Sets a window option value. Passing 'nil' as value deletes the
|
Sets a window option value. Passing 'nil' as value deletes the
|
||||||
option(only works if there's a global fallback)
|
option(only works if there's a global fallback)
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
{name} Option name
|
{name} Option name
|
||||||
{value} Option value
|
{value} Option value
|
||||||
@ -1200,37 +1200,37 @@ nvim_win_get_position({window}) *nvim_win_get_position()*
|
|||||||
Gets the window position in display cells. First position is
|
Gets the window position in display cells. First position is
|
||||||
zero.
|
zero.
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
(row, col) tuple with the window position
|
(row, col) tuple with the window position
|
||||||
|
|
||||||
nvim_win_get_tabpage({window}) *nvim_win_get_tabpage()*
|
nvim_win_get_tabpage({window}) *nvim_win_get_tabpage()*
|
||||||
Gets the window tabpage
|
Gets the window tabpage
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Tabpage that contains the window
|
Tabpage that contains the window
|
||||||
|
|
||||||
nvim_win_get_number({window}) *nvim_win_get_number()*
|
nvim_win_get_number({window}) *nvim_win_get_number()*
|
||||||
Gets the window number
|
Gets the window number
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Window number
|
Window number
|
||||||
|
|
||||||
nvim_win_is_valid({window}) *nvim_win_is_valid()*
|
nvim_win_is_valid({window}) *nvim_win_is_valid()*
|
||||||
Checks if a window is valid
|
Checks if a window is valid
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
true if the window is valid, false otherwise
|
true if the window is valid, false otherwise
|
||||||
|
|
||||||
|
|
||||||
@ -1240,26 +1240,26 @@ Tabpage Functions *api-tabpage*
|
|||||||
nvim_tabpage_list_wins({tabpage}) *nvim_tabpage_list_wins()*
|
nvim_tabpage_list_wins({tabpage}) *nvim_tabpage_list_wins()*
|
||||||
Gets the windows in a tabpage
|
Gets the windows in a tabpage
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{tabpage} Tabpage
|
{tabpage} Tabpage
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
List of windows in tabpage
|
List of windows in tabpage
|
||||||
|
|
||||||
nvim_tabpage_get_var({tabpage}, {name}) *nvim_tabpage_get_var()*
|
nvim_tabpage_get_var({tabpage}, {name}) *nvim_tabpage_get_var()*
|
||||||
Gets a tab-scoped (t:) variable
|
Gets a tab-scoped (t:) variable
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{tabpage} Tabpage handle
|
{tabpage} Tabpage handle
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Variable value
|
Variable value
|
||||||
|
|
||||||
nvim_tabpage_set_var({tabpage}, {name}, {value}) *nvim_tabpage_set_var()*
|
nvim_tabpage_set_var({tabpage}, {name}, {value}) *nvim_tabpage_set_var()*
|
||||||
Sets a tab-scoped (t:) variable
|
Sets a tab-scoped (t:) variable
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{tabpage} Tabpage handle
|
{tabpage} Tabpage handle
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
{value} Variable value
|
{value} Variable value
|
||||||
@ -1267,35 +1267,35 @@ nvim_tabpage_set_var({tabpage}, {name}, {value}) *nvim_tabpage_set_var()*
|
|||||||
nvim_tabpage_del_var({tabpage}, {name}) *nvim_tabpage_del_var()*
|
nvim_tabpage_del_var({tabpage}, {name}) *nvim_tabpage_del_var()*
|
||||||
Removes a tab-scoped (t:) variable
|
Removes a tab-scoped (t:) variable
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{tabpage} Tabpage handle
|
{tabpage} Tabpage handle
|
||||||
{name} Variable name
|
{name} Variable name
|
||||||
|
|
||||||
nvim_tabpage_get_win({tabpage}) *nvim_tabpage_get_win()*
|
nvim_tabpage_get_win({tabpage}) *nvim_tabpage_get_win()*
|
||||||
Gets the current window in a tabpage
|
Gets the current window in a tabpage
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{tabpage} Tabpage handle
|
{tabpage} Tabpage handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Window handle
|
Window handle
|
||||||
|
|
||||||
nvim_tabpage_get_number({tabpage}) *nvim_tabpage_get_number()*
|
nvim_tabpage_get_number({tabpage}) *nvim_tabpage_get_number()*
|
||||||
Gets the tabpage number
|
Gets the tabpage number
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{tabpage} Tabpage handle
|
{tabpage} Tabpage handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
Tabpage number
|
Tabpage number
|
||||||
|
|
||||||
nvim_tabpage_is_valid({tabpage}) *nvim_tabpage_is_valid()*
|
nvim_tabpage_is_valid({tabpage}) *nvim_tabpage_is_valid()*
|
||||||
Checks if a tabpage is valid
|
Checks if a tabpage is valid
|
||||||
|
|
||||||
Parameters:~
|
Parameters: ~
|
||||||
{tabpage} Tabpage handle
|
{tabpage} Tabpage handle
|
||||||
|
|
||||||
Return:~
|
Return: ~
|
||||||
true if the tabpage is valid, false otherwise
|
true if the tabpage is valid, false otherwise
|
||||||
|
|
||||||
|
|
||||||
|
@ -1528,8 +1528,8 @@ v:event Dictionary of event data for the current |autocommand|. Valid
|
|||||||
event, e.g. |DirChanged| or |TextYankPost|.
|
event, e.g. |DirChanged| or |TextYankPost|.
|
||||||
KEY DESCRIPTION ~
|
KEY DESCRIPTION ~
|
||||||
abort Whether the event triggered during
|
abort Whether the event triggered during
|
||||||
an aborting condition, i e |c_Esc| or
|
an aborting condition (e.g. |c_Esc| or
|
||||||
|c_CTRL-c|for |CmdlineLeave|.
|
|c_CTRL-c| for |CmdlineLeave|).
|
||||||
cmdlevel Level of cmdline.
|
cmdlevel Level of cmdline.
|
||||||
cmdtype Type of cmdline, |cmdline-char|.
|
cmdtype Type of cmdline, |cmdline-char|.
|
||||||
cwd Current working directory.
|
cwd Current working directory.
|
||||||
@ -4995,6 +4995,9 @@ jobstart({cmd}[, {opts}]) *jobstart()*
|
|||||||
:call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}'])
|
:call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}'])
|
||||||
< (See |shell-unquoting| for details.)
|
< (See |shell-unquoting| for details.)
|
||||||
|
|
||||||
|
Example: >
|
||||||
|
:call jobstart('nvim -h', {'on_stdout':{j,d,e->append(line('.'),d)}})
|
||||||
|
<
|
||||||
Returns |job-id| on success, 0 on invalid arguments (or job
|
Returns |job-id| on success, 0 on invalid arguments (or job
|
||||||
table is full), -1 if {cmd}[0] or 'shell' is not executable.
|
table is full), -1 if {cmd}[0] or 'shell' is not executable.
|
||||||
For communication over the job's stdio, it is represented as a
|
For communication over the job's stdio, it is represented as a
|
||||||
|
@ -310,14 +310,22 @@ semantically equivalent in Lua to:
|
|||||||
return chunk(arg) -- return typval
|
return chunk(arg) -- return typval
|
||||||
end
|
end
|
||||||
|
|
||||||
Note that "_A" receives the argument to "luaeval". Lua nils, numbers, strings,
|
Lua nils, numbers, strings, tables and booleans are converted to their
|
||||||
tables and booleans are converted to their respective VimL types. An error is
|
respective VimL types. An error is thrown if conversion of any other Lua types
|
||||||
thrown if conversion of any of the remaining Lua types is attempted.
|
is attempted.
|
||||||
|
|
||||||
Note 2: lua tables are used as both dictionaries and lists, thus making it
|
The magic global "_A" contains the second argument to luaeval().
|
||||||
impossible to determine whether empty table is meant to be empty list or empty
|
|
||||||
dictionary. Additionally lua does not have integer numbers. To distinguish
|
Example: >
|
||||||
between these cases there is the following agreement:
|
:echo luaeval('_A[1] + _A[2]', [40, 2])
|
||||||
|
42
|
||||||
|
:echo luaeval('string.match(_A, "[a-z]+")', 'XYXfoo123')
|
||||||
|
foo
|
||||||
|
|
||||||
|
Lua tables are used as both dictionaries and lists, so it is impossible to
|
||||||
|
determine whether empty table is meant to be empty list or empty dictionary.
|
||||||
|
Additionally lua does not have integer numbers. To distinguish between these
|
||||||
|
cases there is the following agreement:
|
||||||
|
|
||||||
0. Empty table is empty list.
|
0. Empty table is empty list.
|
||||||
1. Table with N incrementally growing integral numbers, starting from 1 and
|
1. Table with N incrementally growing integral numbers, starting from 1 and
|
||||||
|
@ -4845,9 +4845,10 @@ Cursor character under the cursor
|
|||||||
*hl-CursorIM*
|
*hl-CursorIM*
|
||||||
CursorIM like Cursor, but used when in IME mode |CursorIM|
|
CursorIM like Cursor, but used when in IME mode |CursorIM|
|
||||||
*hl-CursorColumn*
|
*hl-CursorColumn*
|
||||||
CursorColumn screen column at the cursor, when 'cursorcolumn' is set
|
CursorColumn Screen-column at the cursor, when 'cursorcolumn' is set.
|
||||||
*hl-CursorLine*
|
*hl-CursorLine*
|
||||||
CursorLine screen line at the cursor, when 'cursorline' is set
|
CursorLine Screen-line at the cursor, when 'cursorline' is set.
|
||||||
|
Low-priority if foreground (ctermfg OR guifg) is not set.
|
||||||
*hl-Directory*
|
*hl-Directory*
|
||||||
Directory directory names (and other special names in listings)
|
Directory directory names (and other special names in listings)
|
||||||
*hl-DiffAdd*
|
*hl-DiffAdd*
|
||||||
|
@ -188,7 +188,7 @@ def parse_params(parent, width=62):
|
|||||||
desc = parse_parblock(desc_node, width=None)
|
desc = parse_parblock(desc_node, width=None)
|
||||||
items.append((name.strip(), desc.strip()))
|
items.append((name.strip(), desc.strip()))
|
||||||
|
|
||||||
out = 'Parameters:~\n'
|
out = 'Parameters: ~\n'
|
||||||
for name, desc in items:
|
for name, desc in items:
|
||||||
name = ' %s' % name.ljust(name_length)
|
name = ' %s' % name.ljust(name_length)
|
||||||
out += doc_wrap(desc, prefix=name, width=width) + '\n'
|
out += doc_wrap(desc, prefix=name, width=width) + '\n'
|
||||||
@ -229,7 +229,7 @@ def parse_para(parent, width=62):
|
|||||||
prefix=' ',
|
prefix=' ',
|
||||||
width=width))
|
width=width))
|
||||||
elif kind == 'return':
|
elif kind == 'return':
|
||||||
lines.append('%s:~' % kind.title())
|
lines.append('%s: ~' % kind.title())
|
||||||
lines.append(doc_wrap(parse_para(child),
|
lines.append(doc_wrap(parse_para(child),
|
||||||
prefix=' ',
|
prefix=' ',
|
||||||
width=width))
|
width=width))
|
||||||
@ -361,16 +361,16 @@ def parse_source_xml(filename):
|
|||||||
|
|
||||||
annotations = '\n'.join(annotations)
|
annotations = '\n'.join(annotations)
|
||||||
if annotations:
|
if annotations:
|
||||||
annotations = ('\n\nAttributes:~\n' +
|
annotations = ('\n\nAttributes: ~\n' +
|
||||||
textwrap.indent(annotations, ' '))
|
textwrap.indent(annotations, ' '))
|
||||||
i = doc.rfind('Parameters:~')
|
i = doc.rfind('Parameters: ~')
|
||||||
if i == -1:
|
if i == -1:
|
||||||
doc += annotations
|
doc += annotations
|
||||||
else:
|
else:
|
||||||
doc = doc[:i] + annotations + '\n\n' + doc[i:]
|
doc = doc[:i] + annotations + '\n\n' + doc[i:]
|
||||||
|
|
||||||
if 'INCLUDE_C_DECL' in os.environ:
|
if 'INCLUDE_C_DECL' in os.environ:
|
||||||
doc += '\n\nC Declaration:~\n>\n'
|
doc += '\n\nC Declaration: ~\n>\n'
|
||||||
doc += c_decl
|
doc += c_decl
|
||||||
doc += '\n<'
|
doc += '\n<'
|
||||||
|
|
||||||
@ -441,7 +441,7 @@ def gen_docs(config):
|
|||||||
doc += '\n\n' + functions
|
doc += '\n\n' + functions
|
||||||
|
|
||||||
if 'INCLUDE_DEPRECATED' in os.environ and deprecated:
|
if 'INCLUDE_DEPRECATED' in os.environ and deprecated:
|
||||||
doc += '\n\n\nDeprecated %s Functions:~\n\n' % name
|
doc += '\n\n\nDeprecated %s Functions: ~\n\n' % name
|
||||||
doc += deprecated
|
doc += deprecated
|
||||||
|
|
||||||
if doc:
|
if doc:
|
||||||
|
@ -191,11 +191,11 @@ ArrayOf(String) buffer_get_line_slice(Buffer buffer,
|
|||||||
return nvim_buf_get_lines(0, buffer, start , end, false, err);
|
return nvim_buf_get_lines(0, buffer, start , end, false, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Retrieves a line range from the buffer
|
/// Gets a line-range from the buffer.
|
||||||
///
|
///
|
||||||
/// Indexing is zero-based, end-exclusive. Negative indices are interpreted
|
/// Indexing is zero-based, end-exclusive. Negative indices are interpreted
|
||||||
/// as length+1+index, i e -1 refers to the index past the end. So to get the
|
/// as length+1+index: -1 refers to the index past the end. So to get the
|
||||||
/// last element set start=-2 and end=-1.
|
/// last element use start=-2 and end=-1.
|
||||||
///
|
///
|
||||||
/// Out-of-bounds indices are clamped to the nearest valid value, unless
|
/// Out-of-bounds indices are clamped to the nearest valid value, unless
|
||||||
/// `strict_indexing` is set.
|
/// `strict_indexing` is set.
|
||||||
@ -286,14 +286,14 @@ void buffer_set_line_slice(Buffer buffer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Replaces line range on the buffer
|
/// Sets (replaces) a line-range in the buffer.
|
||||||
///
|
///
|
||||||
/// Indexing is zero-based, end-exclusive. Negative indices are interpreted
|
/// Indexing is zero-based, end-exclusive. Negative indices are interpreted
|
||||||
/// as length+1+index, i e -1 refers to the index past the end. So to change
|
/// as length+1+index: -1 refers to the index past the end. So to change
|
||||||
/// or delete the last element set start=-2 and end=-1.
|
/// or delete the last element use start=-2 and end=-1.
|
||||||
///
|
///
|
||||||
/// To insert lines at a given index, set both start and end to the same index.
|
/// To insert lines at a given index, set `start` and `end` to the same index.
|
||||||
/// To delete a range of lines, set replacement to an empty array.
|
/// To delete a range of lines, set `replacement` to an empty array.
|
||||||
///
|
///
|
||||||
/// Out-of-bounds indices are clamped to the nearest valid value, unless
|
/// Out-of-bounds indices are clamped to the nearest valid value, unless
|
||||||
/// `strict_indexing` is set.
|
/// `strict_indexing` is set.
|
||||||
|
Loading…
Reference in New Issue
Block a user