One of the new features in Vim 7.3 is \'persistent undo\', which allows for the undotree to be saved to a file when exiting a buffer.
Unfortunately, I haven\'t quite
I suppose $HOME doesn't work as advertised.
On my system, :echo $HOME shows H:\, but : e $HOME/ says: ~/ invalid filename.
:echo $HOME
: e $HOME/
~/
You could try with an absolute path to see whether it cures it