mirror of
https://github.com/neovim/neovim.git
synced 2026-03-18 14:48:13 +00:00
API: rename nvim_execute_lua => nvim_exec_lua
- We already find ourselves renaming nvim_execute_lua in tests and scripts, which suggests "exec" is the verb we actually want. - Add "exec" verb to `:help dev-api`.
This commit is contained in:
@@ -483,7 +483,8 @@ nvim_exec({src}, {output}) *nvim_exec()*
|
||||
Executes Vimscript (multiline block of Ex-commands), like
|
||||
anonymous |:source|.
|
||||
|
||||
Optionally returns (non-error, non-shell |:!|) output.
|
||||
Unlike |nvim_command()| this function supports heredocs,
|
||||
script-scope (s:), etc.
|
||||
|
||||
On execution error: fails with VimL error, does not update
|
||||
v:errmsg.
|
||||
@@ -493,6 +494,10 @@ nvim_exec({src}, {output}) *nvim_exec()*
|
||||
{output} Capture and return all (non-error, non-shell
|
||||
|:!|) output
|
||||
|
||||
Return: ~
|
||||
Output (non-error, non-shell |:!|) if `output` is true,
|
||||
else empty string.
|
||||
|
||||
See also: ~
|
||||
|execute()|
|
||||
|nvim_command()|
|
||||
@@ -643,7 +648,7 @@ nvim_eval({expr}) *nvim_eval()*
|
||||
Return: ~
|
||||
Evaluation result or expanded object
|
||||
|
||||
nvim_execute_lua({code}, {args}) *nvim_execute_lua()*
|
||||
nvim_exec_lua({code}, {args}) *nvim_exec_lua()*
|
||||
Execute Lua code. Parameters (if any) are available as `...`
|
||||
inside the chunk. The chunk can return a value.
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ updated.
|
||||
API ~
|
||||
*nvim_buf_clear_highlight()* Use |nvim_buf_clear_namespace()| instead.
|
||||
*nvim_command_output()* Use |nvim_exec()| instead.
|
||||
*nvim_execute_lua()* Use |nvim_exec_lua()| instead.
|
||||
|
||||
Commands ~
|
||||
*:rv*
|
||||
|
||||
@@ -236,10 +236,11 @@ with a {thing} that groups functions under a common concept).
|
||||
|
||||
Use existing common {action} names if possible:
|
||||
add Append to, or insert into, a collection
|
||||
get Get a thing (or group of things by query)
|
||||
set Set a thing (or group of things)
|
||||
del Delete a thing (or group of things)
|
||||
exec Execute code
|
||||
get Get a thing (or group of things by query)
|
||||
list Get all things
|
||||
set Set a thing (or group of things)
|
||||
|
||||
Use consistent names for {thing} in all API functions. E.g. a buffer is called
|
||||
"buf" everywhere, not "buffer" in some places and "buf" in others.
|
||||
|
||||
Reference in New Issue
Block a user