Files
dotfiles/.config/vim/vimrc.d/70-functions.vim
Julian Prein 4b421f6b78 vim:funcs: Silence checktime call
The checktime command is not available in the command line window. As
the `CheckTime` function runs every second, the command line window
spits out an error message every second making it practically unusable.

This patch silences the `checktime` call to fix this.
2022-06-23 23:58:43 +02:00

20 lines
548 B
VimL

" Functions """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Toggle spell language between German and English
function! CycleSpellLang()
if (&spelllang == 'en')
set spelllang=de
else
set spelllang=en
endif
endfunction
" 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
execute timer_start(1000, 'CheckTime', {'repeat': -1})
endif