Moved some code around
This commit is contained in:
parent
8e14914602
commit
7cb41a20ac
@ -61,12 +61,12 @@ function! youcompleteme#Enable()
|
|||||||
|
|
||||||
call s:SetUpSigns()
|
call s:SetUpSigns()
|
||||||
call s:SetUpSyntaxHighlighting()
|
call s:SetUpSyntaxHighlighting()
|
||||||
call youcompleteme#EnableCursorMovedAutocommands()
|
|
||||||
|
|
||||||
if g:ycm_allow_changing_updatetime && &updatetime > 2000
|
if g:ycm_allow_changing_updatetime && &updatetime > 2000
|
||||||
set ut=2000
|
set ut=2000
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
call youcompleteme#EnableCursorMovedAutocommands()
|
||||||
augroup youcompleteme
|
augroup youcompleteme
|
||||||
autocmd!
|
autocmd!
|
||||||
" Note that these events will NOT trigger for the file vim is started with;
|
" Note that these events will NOT trigger for the file vim is started with;
|
||||||
@ -92,6 +92,21 @@ function! youcompleteme#Enable()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function youcompleteme#EnableCursorMovedAutocommands()
|
||||||
|
augroup ycmcompletemecursormove
|
||||||
|
autocmd!
|
||||||
|
autocmd CursorMovedI * call s:OnCursorMovedInsertMode()
|
||||||
|
autocmd CursorMoved * call s:OnCursorMovedNormalMode()
|
||||||
|
augroup END
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function youcompleteme#DisableCursorMovedAutocommands()
|
||||||
|
autocmd! ycmcompletemecursormove CursorMoved *
|
||||||
|
autocmd! ycmcompletemecursormove CursorMovedI *
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! s:SetUpPython() abort
|
function! s:SetUpPython() abort
|
||||||
py import sys
|
py import sys
|
||||||
py import vim
|
py import vim
|
||||||
@ -808,18 +823,6 @@ endfunction
|
|||||||
|
|
||||||
command! YcmDiags call s:ShowDiagnostics()
|
command! YcmDiags call s:ShowDiagnostics()
|
||||||
|
|
||||||
function youcompleteme#EnableCursorMovedAutocommands()
|
|
||||||
augroup ycmcompletemecursormove
|
|
||||||
autocmd!
|
|
||||||
autocmd CursorMovedI * call s:OnCursorMovedInsertMode()
|
|
||||||
autocmd CursorMoved * call s:OnCursorMovedNormalMode()
|
|
||||||
augroup END
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function youcompleteme#DisableCursorMovedAutocommands()
|
|
||||||
autocmd! ycmcompletemecursormove CursorMoved *
|
|
||||||
autocmd! ycmcompletemecursormove CursorMovedI *
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" This is basic vim plugin boilerplate
|
" This is basic vim plugin boilerplate
|
||||||
let &cpo = s:save_cpo
|
let &cpo = s:save_cpo
|
||||||
|
Loading…
Reference in New Issue
Block a user