:wu

You can write your current undo information to file with either of the following:

:wu filename
:wundo filename

Further Reading

:h :wu :h viminfo

More Gifs