Permalink
Browse files

Preserve existing <CR> mappings in insert mode

Closes #136. Thanks to @pera.
  • Loading branch information...
xaizek committed May 26, 2012
1 parent 486acce commit f6ced73ea19457d079550681126f5ed8cf835247
Showing with 2 additions and 1 deletion.
  1. +2 −1 plugin/clang_complete.vim
@@ -89,7 +89,8 @@ function! s:ClangCompleteInit()
inoremap <expr> <buffer> . <SID>CompleteDot()
inoremap <expr> <buffer> > <SID>CompleteArrow()
inoremap <expr> <buffer> : <SID>CompleteColon()
- inoremap <expr> <buffer> <CR> <SID>HandlePossibleSelectionEnter()
+ " Based on https://github.com/tpope/vim-endwise/pull/13
+ exe 'inoremap <expr> <buffer> <CR> '.maparg('<CR>', 'i').'<SID>HandlePossibleSelectionEnter()'
if g:clang_snippets == 1
call g:ClangSetSnippetEngine(g:clang_snippets_engine)

0 comments on commit f6ced73

Please sign in to comment.