Skip to content

Commit

Permalink
replace iunmap <CR> with inoremap <CR> <CR>
Browse files Browse the repository at this point in the history
If noninvasive completion is set, i get the following error:

Error detected while processing ~/.vimrc:
line  730:
E31: No such mapping
Press ENTER or type command to continue

To avoid this "no such mapping" error, instead of unmapping the commands for <CR> one can simply overwrite it with itself to reset it, which works regardless of wether the mapping existed or not.
  • Loading branch information
wolfgangpfnuer committed Sep 3, 2014
1 parent 70c38b1 commit a299f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .vimrc
Expand Up @@ -727,7 +727,7 @@
smap <C-k> <Plug>(neosnippet_expand_or_jump)
endif
if exists('g:spf13_noninvasive_completion')
iunmap <CR>
inoremap <CR> <CR>
" <ESC> takes you out of insert mode
inoremap <expr> <Esc> pumvisible() ? "\<C-y>\<Esc>" : "\<Esc>"
" <CR> accepts first, then sends the <CR>
Expand Down Expand Up @@ -840,7 +840,7 @@
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
if exists('g:spf13_noninvasive_completion')
iunmap <CR>
inoremap <CR> <CR>
" <ESC> takes you out of insert mode
inoremap <expr> <Esc> pumvisible() ? "\<C-y>\<Esc>" : "\<Esc>"
" <CR> accepts first, then sends the <CR>
Expand Down

0 comments on commit a299f31

Please sign in to comment.