Closed char101 closed 5 years ago
Hi there! I'm not experiencing the behavior you describe. In my testing, pressing \<CR> simply accepts the completion entry without inserting a newline. Are you using an autocompletion plugin, or do you have mappings in your config that affect the completion menu?
Regardless, to disable pair expansion when the completion menu is visible, you can put the following in your vimrc:
imap <expr> <CR> !pumvisible() ? "\<Plug>(PearTreeExpand)" : "\<CR>"
Hi,
Thanks for your reply. I do have this mapping in my vimrc
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>"
Adding the mapping above seems to do the trick.
Otherwise when I select an entry in the completion menu it will results in a newline.
Thanks.