Skip to content

Commit 55633be

Browse files
committed
Fixing <cr> in .vimrc
1 parent 98f4b56 commit 55633be

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.vimrc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,13 @@
442442
inoremap <expr><C-g> neocomplcache#undo_completion()
443443
inoremap <expr><C-l> neocomplcache#complete_common_string()
444444
445-
" <CR>: close popup
445+
446+
" <CR>: close popup
446447
" <s-CR>: close popup and save indent.
447-
inoremap <expr><CR> neocomplcache#close_popup()
448-
inoremap <expr><s-CR> neocomplcache#close_popup() . "\<CR>"
448+
inoremap <expr><CR> pumvisible() ? neocomplcache#close_popup() : "\<CR>"
449+
inoremap <expr><s-CR> pumvisible() ? neocomplcache#close_popup() "\<CR>" : "\<CR>"
449450
" <TAB>: completion.
450-
"inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
451+
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
451452
452453
" <C-h>, <BS>: close popup and delete backword char.
453454
inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>"

0 commit comments

Comments
 (0)