Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any simple way to see a diff between the current state of the file and the state that it would be if I were to u once? Sometimes I would like to see what the last change was (especially when I'm not sure what I pressed) but a simple blink-test (u and ^r) isn't making the last change obvious.

I could probably perform an undo, then write it to another buffer, then revert the undo, then vimdiff the buffers. However I am hoping that something simpler exists.

Thanks.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

Both the undotree.vim - Display your undo history in a graph plugin and Gundo - Visualize your undo tree (requires Python) can do that. It'll show the undo points on the left side and a diff of the last undo in a bottom window.

share|improve this answer
    
Terrific, Ingo. Thank you very much! –  dotancohen Jun 10 '13 at 4:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.