From 5d89aef90757267a9d1007822a47aeb58b2e75d2 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Mon, 11 Feb 2013 21:45:42 -0800 Subject: [PATCH] Removing YCM as omnifunc if no native support --- autoload/youcompleteme.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index 2a7937ea..52aaf294 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -194,6 +194,13 @@ function! s:SetCompleteFunc() if pyeval( 'ycm_state.NativeFiletypeCompletionUsable()' ) let &omnifunc = 'youcompleteme#OmniComplete' let &l:omnifunc = 'youcompleteme#OmniComplete' + + " If we don't have native filetype support but the omnifunc is set to YCM's + " omnifunc because the previous file the user was editing DID have native + " support, we remove our omnifunc. + elseif &omnifunc == 'youcompleteme#OmniComplete' + let &omnifunc = '' + let &l:omnifunc = '' endif endfunction