From 496fe8f7a3207c0cf330381679fa6c2cdac009ee Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Mon, 2 Sep 2013 11:34:18 -0700 Subject: [PATCH] Reordering some YCM init logic --- autoload/youcompleteme.vim | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index 51f6e1d1..d3254148 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -51,6 +51,19 @@ function! youcompleteme#Enable() return endif + call s:SetUpCpoptions() + call s:SetUpCompleteopt() + call s:SetUpKeyMappings() + call s:SetUpBackwardsCompatibility() + + if g:ycm_register_as_syntastic_checker + call s:ForceSyntasticCFamilyChecker() + endif + + if g:ycm_allow_changing_updatetime + set ut=2000 + endif + py from ycm.youcompleteme import YouCompleteMe py ycm_state = YouCompleteMe() @@ -71,19 +84,6 @@ function! youcompleteme#Enable() autocmd VimLeave * call s:OnVimLeave() augroup END - call s:SetUpCpoptions() - call s:SetUpCompleteopt() - call s:SetUpKeyMappings() - call s:SetUpBackwardsCompatibility() - - if g:ycm_register_as_syntastic_checker - call s:ForceSyntasticCFamilyChecker() - endif - - if g:ycm_allow_changing_updatetime - set ut=2000 - endif - " Calling this once solves the problem of BufRead/BufEnter not triggering for " the first loaded file. This should be the last command executed in this " function!