Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question
up vote 3 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .