diff options
| author | jdhao <jdhao@hotmail.com> | 2021-07-24 13:11:24 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2021-07-24 13:11:24 +0800 |
| commit | b0eb7c4508599a7eace480d89e764612664839a3 (patch) | |
| tree | 3953f666c978477b12b11f450f77a9eefba775bc /core/autocommands.vim | |
| parent | edd74337a9c851673da4a04bdc8c145d26c30a6b (diff) | |
Simplify file reload logic
Diffstat (limited to 'core/autocommands.vim')
| -rw-r--r-- | core/autocommands.vim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/autocommands.vim b/core/autocommands.vim index e88a1db..29b4cea 100644 --- a/core/autocommands.vim +++ b/core/autocommands.vim @@ -42,10 +42,9 @@ augroup END " https://vi.stackexchange.com/a/20397/15292. augroup auto_read autocmd! - autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * - \ if mode() == 'n' && getcmdwintype() == '' | checktime | endif autocmd FileChangedShellPost * echohl WarningMsg \ | echo "File changed on disk. Buffer reloaded!" | echohl None + autocmd FocusGained,CursorHold * if getcmdwintype() == '' | checktime | endif augroup END augroup numbertoggle |
