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

(cherry picked from commit d541e0d6e0)
This commit is contained in:
ADoyle
2023-01-06 14:30:45 +01:00
committed by Simon Hauser
parent c8d69359d4
commit 2bf2d10d19
4 changed files with 37 additions and 41 deletions
+5
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