How can I undo all changes since opening a buffer? I imagine there may be some form of :earlier
that does this.
Update: Many are suggesting
You can use the
:edit!
command to get into the earliest saved state. See :help edit!
for more information.
You can also check something like gundo.vim
(can be found here), which displays the whole undo tree graphically, and you can easily jump between points. Then there is the histwin plugin which I did not used yet, but offers similar functionality.