neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 5c4ec254784e7e92f61b69114c6091a198fe600f
parent db851cb105ac9f295a836a39ff73da14a70ae754
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Thu, 21 Apr 2022 17:31:40 +0800

Merge pull request #18200 from atusy/doc-vim-keymap-set

docs: vim.keymap.set can specify buffer as an option
Diffstat:
Mruntime/doc/lua.txt | 3+++
Mruntime/lua/vim/keymap.lua | 2++
2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt @@ -2055,6 +2055,9 @@ set({mode}, {lhs}, {rhs}, {opts}) *vim.keymap.set()* "silent". In addition to the options listed in |nvim_set_keymap()|, this table also accepts the following keys: + • buffer: (number or boolean) Add a mapping to the + given buffer. When "true" or 0, use the current + buffer. • replace_keycodes: (boolean, default true) When both this and expr is "true", |nvim_replace_termcodes()| is applied to the diff --git a/runtime/lua/vim/keymap.lua b/runtime/lua/vim/keymap.lua @@ -40,6 +40,8 @@ local keymap = {} -- ---@param opts table A table of |:map-arguments| such as "silent". In addition to the options --- listed in |nvim_set_keymap()|, this table also accepts the following keys: +--- - buffer: (number or boolean) Add a mapping to the given buffer. When "true" +--- or 0, use the current buffer. --- - replace_keycodes: (boolean, default true) When both this and expr is "true", --- |nvim_replace_termcodes()| is applied to the result of Lua expr maps. --- - remap: (boolean) Make the mapping recursive. This is the