Incompatible with autopairs
QianChenglong opened this issue · comments
When use a snipet, input will output <SNR>49_AutoPairsReturn
, instead of execute it.
Here is my track.
Before use a snippet:
:imap <CR>
=> i <CR> &@<CR><SNR>49_AutoPairsReturn
:verbose imap <CR>
show
Last set from ~\.vim\bundle\auto-pairs\plugin\auto-pairs.vim
After use any snippet:
:imap <CR>
=> i<CR> *@<CR><SNR>49_AutoPairsReturn
:verbose imap <CR>
show
Last set from ~\.vim\bundle\xptemplate\autoload\xpt\msvr.vim
Can you check it?Thank you!
Were you using vim older than 7.04? If you were, just upgrading vim to newest version fixes this issue
Before vim 7.04, maparg()
does not return full key mapping info, thus XPTemplate does not know if a key mapping is <expr>
or not. And if the right part of the mapping does not look like a function call, XPTemplate treats it as normal key mapping and restores the wrong mapping.
Vim 7.04 or newer has no such issue.
Thanks for your reporting. If this does not fix your problem, please let me know what version of vim you were using and I'll have a deeper dig into it.
Thanks for your reply!
Here is my gvim version.
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 3 2013 22:38:02)
MS-Windows 64-bit GUI version
If you need more information, please tell me, thank you!!!
I updated branch master
with this issue fixed: XPTemplate did not deal with script-local
key mapping correctly.
Please have a look if it fixed your problem.
Thanks!!!
Problem has been solved!
Thanks again!!!
That's great. Then I close this issue.