Use the undotree plugin.