Since vim version 7.3 the feature 'persistent_undo' is supported, which makes it possible do undo/redo changes, even after closing vim or restarting your computer.
It's possible to configure it by adding the following to your vimrc, but first create a directory, where your undofiles should be saved...