Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Forcing the critical 'B' flag in cpoptions

Fixes #223.
  • Loading branch information...
commit e4fc9a11363c016dc9086adcb8fc520674d585f7 1 parent a75c92b
@Valloric authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 autoload/youcompleteme.vim
8 autoload/youcompleteme.vim
@@ -67,6 +67,7 @@ function! youcompleteme#Enable()
autocmd InsertEnter * call s:OnInsertEnter()
augroup END
+ call s:SetUpCpoptions()
call s:SetUpCompleteopt()
call s:SetUpKeyMappings()
@@ -153,6 +154,13 @@ function! s:AllowedToCompleteInCurrentFile()
+function! s:SetUpCpoptions()
+ " Without this flag in cpoptions, critical YCM mappings do not work. There's
+ " no way to not have this and have YCM working, so force the flag.
+ set cpoptions+=B
function! s:SetUpCompleteopt()
" Some plugins (I'm looking at you, vim-notes) change completeopt by for
" instance adding 'longest'. This breaks YCM. So we force our settings.
Please sign in to comment.
Something went wrong with that request. Please try again.