mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Do not set checktime if already set
This commit is contained in:
@@ -3500,12 +3500,6 @@ if !has_key(s:disabled_packages, 'sensible')
|
||||
" Disable swap, it doesn't play well with autoread
|
||||
set noswapfile
|
||||
|
||||
" Auto reload if file was changed somewhere else (for autoread)
|
||||
augroup polyglot-sensible
|
||||
au!
|
||||
au CursorHold * checktime
|
||||
augroup END
|
||||
|
||||
" Enable highlighted case-insensitive incremential search.
|
||||
set incsearch
|
||||
|
||||
|
||||
@@ -67,6 +67,17 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible') == -
|
||||
set updatetime=300
|
||||
endif
|
||||
|
||||
" Automatically reload file if changed somewhere else
|
||||
redir => capture
|
||||
silent autocmd CursorHold
|
||||
redir END
|
||||
if match(capture, 'checktime') == -1
|
||||
augroup polyglot-sensible
|
||||
au!
|
||||
au CursorHold * checktime
|
||||
augroup END
|
||||
endif
|
||||
|
||||
" Always save upper case variables to viminfo file.
|
||||
if !empty(&viminfo)
|
||||
set viminfo^=!
|
||||
|
||||
Reference in New Issue
Block a user