Closed tweekmonster closed 8 years ago
Thanks, I'd really like to properly fix the problems but it's not likely to happen soon, and this is a reasonable workaround. Can you also update unmaps in peekaboo#off()
accordingly?
Oh wow, totally forgot that. Will update in a sec.
I'd really like to properly fix the problems but it's not likely to happen soon
Something I thought about doing was temporarily unmapping the keys before running feedkeys()
, but I didn't spend that much time studying the source to see what the drawbacks of that would be. It would only work if peekaboo was the starting point, though. :
could be mapped to unmap peekaboo, but that'll probably lead to confusion and unexpected behavior. 😑
Merged, thanks! It seems like feedkeys()
is inherently not very compatible with macros/ex commands, and I almost gave up trying to make it work smoothly in all scenarios.
@junegunn With the recently added "x" and "i" flags for feedkeys, it might be possible to avoid past problems.
This would allow users to optionally toggle peekaboo with a custom prefix when they feel they need it. I think it would also be an acceptable alternative way to use the plugin for people having problems with macros and recursive
normal
commands (as noted in a comment on SE).I originally wanted to have a single setting for the prefix with
<c-x>
as a suggestion in the README, but that would override the default<c-x>
in normal/visual mode and using anything but actrl
prefix in insert mode is just weird.I think the
FAQ
andKnown Issues
would need to be updated, but I didn't want to change the tone of your README.