Vim supports practically unlimited undo with branching history. You can visualize it and hop to any undo with a plugin.
Sort of, anytime you delete something, that text gets stored somewhere in case, 2 hours later, you realised you wanted it.
Undoing a change from 2 hours ago in the same editing session is the trivial use case for undofile.