I use Vim. I open a file. I edit it and I want to see what I\'ve edited before I save it.
How can I do this in Vim?
I can recommend the histwin plugin.
While it doesn't diff to the current saved version of the file (like the other answers), it can vimdiff changes since you started edting, and even replay your changes in order. The difference shows if you save intermediately.
Additionally, it displays a list of all undo history branches and allows you to switch or diff between them.
PS: While the plugin doesn't automatically track moments in the edit history since every file change, you can explicitly "tag" the moment when you save the file such that you can later vimdiff with it, if you want that. Maybe this could be automated?