From 3c148e9ef5a303a599320eb64e608392db82eeb0 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sat, 24 Oct 2020 17:46:15 +0200 Subject: Do not set checktime if already set --- plugin/polyglot.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'plugin') diff --git a/plugin/polyglot.vim b/plugin/polyglot.vim index 7143043e..f989d583 100644 --- a/plugin/polyglot.vim +++ b/plugin/polyglot.vim @@ -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^=! -- cgit v1.2.3