I'm on Archlinux with vim 8.2.2380. Since running updates yesterday, I'm getting W11 warnings periodically just by having a file open in a buffer which has changed on the FS (e.g. when opening log files with vim):
W11: Warning: File "/path/to/logfile.log" has changed since editing started See ":help W11" for more info. [O]K, (L)oad File:
Even worse, the warning is printed again a few seconds later if the file changed again.
This did not happen before the update, and does not seem to be influenced by my (pretty minimalistic) vimrc as it also occurs on the root account that doesn't even have a vimrc. In case it matters I do set
I've found a question dealing with disabling the warning when writing to a file, but I think the warning is useful when writing so I still want to see it in that case. I've also found an SO question advising to use
autoread, but that does not work for me as I do not want to reload the file when it changed. Another advice, also stated in the W11 help entry, says this warning is not shown when
buftype is not empty. However, I don't want to have to set the buftype manually each time I open a log file, and I'm not sure it's possible and/or a good idea to do this automatically for all log files (with various file endings such as .log, .txt, .out etc).
How can I configure vim to not produce any W11 warnings for files simply idling in a buffer? Summarized, I have the following additional requirements:
- I do not want to automatically reload the file when it changes
- I do not want to disable the warning when attempting to write to a file
- I do not want a manual solution such as setting
buftypeby hand after opening a file