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:
parent
edd74337a9
commit
b0eb7c4508
@ -42,10 +42,9 @@ augroup END
|
|||||||
" https://vi.stackexchange.com/a/20397/15292.
|
" https://vi.stackexchange.com/a/20397/15292.
|
||||||
augroup auto_read
|
augroup auto_read
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd FocusGained,BufEnter,CursorHold,CursorHoldI *
|
|
||||||
\ if mode() == 'n' && getcmdwintype() == '' | checktime | endif
|
|
||||||
autocmd FileChangedShellPost * echohl WarningMsg
|
autocmd FileChangedShellPost * echohl WarningMsg
|
||||||
\ | echo "File changed on disk. Buffer reloaded!" | echohl None
|
\ | echo "File changed on disk. Buffer reloaded!" | echohl None
|
||||||
|
autocmd FocusGained,CursorHold * if getcmdwintype() == '' | checktime | endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
augroup numbertoggle
|
augroup numbertoggle
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user