vim: Enable &autoread + autocmd for regular check
This commit is contained in:
@@ -66,3 +66,8 @@ set scrolloff=15
|
||||
set mouse=a
|
||||
" Disable pesky swap file warnings
|
||||
set shortmess+=A
|
||||
" Automatically update file that was modified outside of vim.
|
||||
" Beware that this updates only on certain events and thus works different then
|
||||
" probably expected. See corresponding autocommand or:
|
||||
" https://vi.stackexchange.com/questions/2702
|
||||
set autoread
|
||||
|
||||
@@ -53,3 +53,9 @@ else
|
||||
autocmd VimLeave * silent !echo -ne "\e[5 q"
|
||||
endif
|
||||
endif
|
||||
|
||||
" Read file changes when cursor is not moved for &updatetime ms and then move
|
||||
" cursor to restart the timer
|
||||
if (exists('+autoread') && &autoread)
|
||||
autocmd CursorHold * checktime | call feedkeys('hl')
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user