[PATCH] Disambiguate <Plug> mappings

Create issue
Issue #98 resolved
Sung Pae created an issue

Currently, activating <Plug>RequireFile and <Plug>MacroExpand result in a short pause before the command executes. If notimeout is set, execution is totally suspended until the next keystroke!

The cause of this pause is that Vim allows shortcuts for user commands, so long as it can be disambiguated. In the case of <Plug>RequireFile and <Plug>RequireFileAll, the former is both a valid command and also a prefix of the latter. In this case Vim waits for a moment to see if the user will start typing the remainder of the longer command [1].

Furthermore, if the user has set notimeout, vim will never disambiguate the name clash for you, thus hanging until the next keystroke.

[1]: Can be shown by typing <LocalLeader>rfAll in a clojure buffer

Suggested minor patch attached. Thank you.

Comments (3)

  1. Log in to comment