1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Simplify file reload logic

This commit is contained in:
jdhao 2021-07-24 13:11:24 +08:00
parent edd74337a9
commit b0eb7c4508

View File

@ -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