" plugins: neocomplete let g:neocomplete#enable_at_startup = 1 let g:neocomplete#enable_smart_case = 1 "" <CR>: close popup and save indent. inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR> function! s:my_cr_function() return (pumvisible() ? "\<C-y>" : "" ) . "\<CR>" endfunction "" <TAB>: completion. inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"