Add comments

This commit is contained in:
hrsh7th
2022-01-16 01:00:53 +09:00
parent 440897ef58
commit a54064d940

View File

@@ -122,6 +122,11 @@ keymap.listen = function(mode, lhs, callback)
end end
---Evacuate existing mapping. ---Evacuate existing mapping.
--- NOTE:
--- In insert-mode, we should all mapping evacuate to the `<Plug>` because `<C-r>=` will display gabage message.
--- In cmdline-mode, we shouldn't re-map as `<Plug>` because `cmap <Tab> <Plug>(map-to-tab)` will broke native behavior.
--- We should resolve recursive mapping because existing mapping will feed by `feedkeys` that doesn't solve recursive mapping.
--- We use `<C-r>=` to solve recursive mapping.
---@param map table ---@param map table
keymap.evacuate = setmetatable({ keymap.evacuate = setmetatable({
cache = cache.new(), cache = cache.new(),