aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/api.txt
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-02 11:13:22 +0800
committerGitHub <noreply@github.com>2022-08-02 11:13:22 +0800
commit0a049c322fda5f2bb124429086c2713ff99c7142 (patch)
treecda051948c3dbaa29d7cac37d921829eb86ad380 /runtime/doc/api.txt
parent9c91d5c61382639c06ca59e6cc2bfda6ba6abf18 (diff)
downloadrneovim-0a049c322fda5f2bb124429086c2713ff99c7142.tar.gz
rneovim-0a049c322fda5f2bb124429086c2713ff99c7142.tar.bz2
rneovim-0a049c322fda5f2bb124429086c2713ff99c7142.zip
test: improve mapping tests and docs (#19619)
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r--runtime/doc/api.txt13
1 files changed, 8 insertions, 5 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index aaafa21a59..827d0318ab 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -974,7 +974,7 @@ nvim_get_keymap({mode}) *nvim_get_keymap()*
{mode} Mode short-name ("n", "i", "v", ...)
Return: ~
- Array of maparg()-like dictionaries describing mappings.
+ Array of |maparg()|-like dictionaries describing mappings.
The "buffer" key is always zero.
nvim_get_mark({name}, {opts}) *nvim_get_mark()*
@@ -1508,9 +1508,12 @@ nvim_set_keymap({mode}, {lhs}, {rhs}, {*opts}) *nvim_set_keymap()*
used to give a description to the mapping. When
called from Lua, also accepts a "callback" key
that takes a Lua function to call when the mapping
- is executed. "replace_keycodes" can be used with
- "expr" to replace keycodes, see
- |nvim_replace_termcodes()|.
+ is executed. When "expr" is true,
+ "replace_keycodes" (boolean) can be used to
+ replace keycodes in the resulting string (see
+ |nvim_replace_termcodes()|), and a Lua callback
+ returning `nil` is equivalent to returning an
+ empty string.
nvim_set_var({name}, {value}) *nvim_set_var()*
Sets a global (g:) variable.
@@ -2299,7 +2302,7 @@ nvim_buf_get_keymap({buffer}, {mode}) *nvim_buf_get_keymap()*
{buffer} Buffer handle, or 0 for current buffer
Return: ~
- Array of maparg()-like dictionaries describing mappings.
+ Array of |maparg()|-like dictionaries describing mappings.
The "buffer" key holds the associated buffer handle.
*nvim_buf_get_lines()*