tpope/vim-repeat

Repeating imap commands

nilbus opened this issue · 1 comments

@tpope, I noticed that none of the plugins I've found that use vim-repeat successfully repeat imap commands. For example, your vim-surround plugin has

imap    <C-S> <Plug>Isurround

but Isurround does not call repeat#set. Indeed is not repeatable using ..

I'm hoping to be able to use vim-repeat to fix repeat behavior for jiangmiao/auto-pairs#3, but using repeat#set in the suggested manner seemed to have no effect.

Should vim-repeat be able to support imap commands?

You'd have to call repeat#set with the entirety of the insertion, which I don't think is accessible. I think your best bet would be :undojoin, but it can be a bit fiddly.