Last Updated: February 25, 2016
·
531
· pjambet

Never insert a newline when accepting autocomplete

inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"

This comes from http://vim.wikia.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE