Related to this thread, How can Vim tell me which buffer is changed on disk among multiple buffers?
This Vim configuration automatically checks for changes in opened buffers and notifies when a single file has been modified externally.
set autoread autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * \ if mode() !~ '\v(c|r.?|!|t)' && getcmdwintype() == '' | checktime | endif autocmd FileChangedShellPost * \ echohl WarningMsg | echo "File " . expand('<afile>') . " changed on disk. Buffer reloaded." | echohl None
When multiple files are changed externally, for example, with the tabs open for files A.cpp, B.cpp, C.cpp, and D.cpp.
If two files (A.cpp and C.cpp) are modified outside Vim, the notification should show: "File A.cpp C.cpp changed on disk. Buffer reloaded."