I end up with swap files from crashed Vim sessions (typically ssh session timeouts) often enough, and I'm wondering if there is a way to determine exactly what changes are describe by the swap file. (I can remember what I was working on, but I don't always know how far I got.)

I know that I can save the original to a different name and launch Vim again, with the "recover" option, and then save the result, and compare it to the original to find any changes which didn't get saved before. Is there a way to generate that list of changes without actually modifying the file in question?

(I found this question, Examine swap file, and there is a program given in one of the answers there, but it only prints out basic summary information, not the details about changes.)

1 Answer 1


I recommend you the recover plugin that add a diff function between the current file on disk and the underlying swap content.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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