Files
dotfiles/.config/vim/vimrc.d/70-functions.vim
Julian Prein 4d93db3947 vim: Keep only one timer for checktime
Every time the file was sourced, a new timer was created.
2024-10-27 19:11:12 +01:00

14 lines
441 B
VimL

" Functions """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Check time every second to read file changes.
if (exists('+autoread') && &autoread)
function! CheckTime(timer)
" NOTE: silent the checktime call as it is an invalid command in the
" command line window
silent! checktime
endfunc
if (!exists('g:checktime_timer'))
let g:checktime_timer = timer_start(1000, 'CheckTime', {'repeat': -1})
endif
endif