From 42bbc4fabcf948ac6b8798b8992bcba1fc1d3e59 Mon Sep 17 00:00:00 2001 From: bfredl Date: Sun, 28 May 2023 12:09:52 +0200 Subject: feat(api): support abbreviations in nvim_set_keymap closes #19198 --- runtime/doc/api.txt | 4 +++- runtime/doc/news.txt | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 83422c9501..8c44db1867 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -1486,7 +1486,9 @@ nvim_set_keymap({mode}, {lhs}, {rhs}, {*opts}) *nvim_set_keymap()* Parameters: ~ • {mode} Mode short-name (map command prefix: "n", "i", "v", "x", …) or - "!" for |:map!|, or empty string for |:map|. + "!" for |:map!|, or empty string for |:map|. "ia", "ca" or + "!a" for abbreviation in insert mode, cmdline mode, or both, + respectively • {lhs} Left-hand-side |{lhs}| of the mapping. • {rhs} Right-hand-side |{rhs}| of the mapping. • {opts} Optional parameters map: Accepts all |:map-arguments| as keys diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 87dfefcce8..a901c4f13c 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -82,6 +82,8 @@ The following new APIs or features were added. • |vim.system()| for running system commands. +• |nvim_set_keymap()| now supports abbreviations. + ============================================================================== CHANGED FEATURES *news-changed* -- cgit