mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	docs: vim.keymap.set can specify buffer as an option
This commit is contained in:
		| @@ -2055,6 +2055,9 @@ set({mode}, {lhs}, {rhs}, {opts})                           *vim.keymap.set()* | |||||||
|                             "silent". In addition to the options listed in |                             "silent". In addition to the options listed in | ||||||
|                             |nvim_set_keymap()|, this table also accepts the |                             |nvim_set_keymap()|, this table also accepts the | ||||||
|                             following keys: |                             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 |                             • replace_keycodes: (boolean, default true) When | ||||||
|                               both this and expr is "true", |                               both this and expr is "true", | ||||||
|                               |nvim_replace_termcodes()| is applied to the |                               |nvim_replace_termcodes()| is applied to the | ||||||
|   | |||||||
| @@ -40,6 +40,8 @@ local keymap = {} | |||||||
| -- | -- | ||||||
| ---@param opts table A table of |:map-arguments| such as "silent". In addition to the options | ---@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: | ---                  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", | ---                  - replace_keycodes: (boolean, default true) When both this and expr is "true", | ||||||
| ---                  |nvim_replace_termcodes()| is applied to the result of Lua expr maps. | ---                  |nvim_replace_termcodes()| is applied to the result of Lua expr maps. | ||||||
| ---                  - remap: (boolean) Make the mapping recursive. This is the | ---                  - remap: (boolean) Make the mapping recursive. This is the | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 atusy
					atusy