vim-auto-popmenu icon indicating copy to clipboard operation
vim-auto-popmenu copied to clipboard

与 delimitMate 插件冲突

Open kungyuu opened this issue 8 months ago • 1 comments

问题现象,使用 delimitMate 自动完成诸如 (), {} 按回车不会自动缩进,查看了 delimitMate 文档,有如下描述

e.g.: If you have <CR> expansion enabled, you might want to skip it on pop-upmenus:

imap <expr> <CR> pumvisible()
                 \ ? "\<C-Y>"
                 \ : "<Plug>delimitMateCR"

于是乎查看 apc.vim 代码,果然罪魁祸首是对 做了绑定,按如下修改,自动完成诸如 (), {} 按回车就ok了,用了几年终于发现了这个问题 !!! if get(g:, 'apc_cr_confirm', 0) == 0 "inoremap " \ pumvisible()? "<c-y><cr>" : "<cr>" inoremap \ pumvisible()? "<c-y><cr>" : "delimitMateCR" else " inoremap " \ pumvisible()? "<c-y>" : "<cr>" inoremap \ pumvisible()? "<c-y>" : "delimitMateCR"

kungyuu avatar Mar 08 '25 17:03 kungyuu