Turns out I'm already collecting this data… Vim has recently added a persistent undo feature (enable by setting 'undodir' and 'undofile'; 'undolevel' can also be raised from the default 1000); there is a Gundo plugin that displays the undo tree like a DVCS commit graph.