Undo persistence
When you close Vim, the tree of undos created for the file that you’re working on is usually destroyed. However, it’s possible to make Vim’s undo functionality persist, so that even if you close and re-open Vim, you’ll be able to use the undo command to revert the text to what it was before.
If you want to enable this feature, add set undofile to your Vim configuration.