Closed morefun2compute closed 10 years ago
Oops. The GitHub markdown caught me off-guard. The examples that I meant to write were: <plug>xxx
and <plug>xxxx
I don't set any limit about length. And it's odd for me to use <Plug>
as a lhs to submode#enter_with
. Wouldn't you mind giving me a complete example to reproduce the problem?
Submode key mappings are built on top of normal key mappings. And normal key mappings have a limitation: the maximum length of LHS is 50.
Submode key mappings are prefixed with special characters (like <Plug>(submode-prefix:foo)
) to distinguish from normal key mappings. So that the maximum length of submode LHS is shorter than the one of normal key mappings.
The actual LHSes of submode key mappings include submode names. So that available space is varied on each key mapping. I think 10 or more characters are usually available.
I'll add a note on the document.
I don't know exactly what the problem is, but when I call submode#enter_with, I can use "xxx" as the LHS of the mapping but not "xxxx" or any longer mapping. The limitation doesn't really bother me, but the error message is simply "line 16: invalid argument" with no indication of which script/function had an error, so it took me a while to figure out what was happening.