The ‘undofile’ is a great feature, and I use it a lot. However, one annoyance
is that it’s very easy to accidentally undo changes that I did the last time I
opened the file; which may be 2 minutes ago, an hour ago, last week, or a
So what would happen is that sometimes I would accidentally undo changes from ages ago.
This plugin fixes that by showing a warning.
I originally posted this as an answer on vi Stack Exchange, which also has some other solutions to the same problem.
:help undofile-warn for the full documentation.