From 287d01c8b3d3d433889fcfba8ec4310ea2d6e27e Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Thu, 2 Aug 2012 20:32:29 -0700 Subject: [PATCH] Setting updatetime to 2000 if user allows --- autoload/youcompleteme.vim | 4 ++++ plugin/youcompleteme.vim | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index cc776654..d881a0a7 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -38,6 +38,10 @@ function! youcompleteme#Enable() return endif + if g:ycm_allow_changing_updatetime + set ut=2000 + endif + augroup youcompleteme autocmd! autocmd CursorMovedI * call s:OnCursorMovedInsertMode() diff --git a/plugin/youcompleteme.vim b/plugin/youcompleteme.vim index 23b22202..292d1ed5 100644 --- a/plugin/youcompleteme.vim +++ b/plugin/youcompleteme.vim @@ -27,13 +27,17 @@ endif let g:loaded_youcompleteme = 1 let g:ycm_min_num_of_chars_for_completion = - \ get(g:, 'ycm_min_num_of_chars_for_completion', 2) + \ get( g:, 'ycm_min_num_of_chars_for_completion', 2 ) let g:ycm_filetypes_to_ignore = - \ get(g:, 'ycm_filetypes_to_ignore', { 'notes' : 1 } ) + \ get( g:, 'ycm_filetypes_to_ignore', { 'notes' : 1 } ) let g:ycm_clang_completion_enabled = - \ get(g:, 'ycm_clang_completion_enabled', 1) + \ get( g:, 'ycm_clang_completion_enabled', 1 ) + +let g:ycm_allow_changing_updatetime = + \ get( g:, 'ycm_clang_completion_enabled', 1 ) + " This is basic vim plugin boilerplate let s:save_cpo = &cpo