feat: the parameter "map" of attach_mappings can be list of modes to create mapping on multiple modes (#2220)

This commit is contained in:
ADoyle
2022-11-07 00:42:29 +08:00
committed by GitHub
parent 30826fcfb8
commit d541e0d6e0
4 changed files with 37 additions and 41 deletions

View File

@@ -1775,6 +1775,11 @@ ordered from the lowest priority to the highest priority.
map("i", "asdf", function(_prompt_bufnr)
print "You typed asdf"
end)
map({"i", "n"}, "<C-r>", function(_prompt_bufnr)
print "You typed <C-r>"
end)
-- needs to return true if you want to map default_mappings and
-- false if not
return true