vim: Use timer instead of autocommand for autoread

This commit is contained in:
2021-04-26 17:56:15 +02:00
parent a9b5c19f2f
commit 22501182ce
2 changed files with 8 additions and 6 deletions

View File

@@ -7,3 +7,11 @@ function! CycleSpellLang()
set spelllang=en
endif
endfunction
" Check time every second to read file changes.
if (exists('+autoread') && &autoread)
function! CheckTime(timer)
checktime
endfunc
execute timer_start(1000, 'CheckTime', {'repeat': -1})
endif