Undo is nice to have in Vim. But sometimes, at a known good point, I want to erase my undo history - to be able to use u to undo individual changes, but only back to a certain point. (For instance, this might be when I last committed.)
One way to accomplish this would be to close and reopen the file - the undo history starts clean at that point. But that's a hassle.
In the past, I accomplished this with :edit!. But in Vim 7.3, that doesn't discard the undo history.
Is there another way to do this, apart from closing the file?
git checkout -f fileorhg rollback file? – akira Nov 24 '10 at 18:34uto undo individual changes, but not past the point where I last committed. Exactly as if, every time I committed, I closed the file and re-opened it. Which is what:edit!used to do - it was like closing the file and reopening it. This doesn't HAVE to be tied to a commit point, that's just the time when I'd most frequently want it. – Nathan Long Nov 24 '10 at 20:08