When a previous Vim session crashed, you are greeted with the "Swap file ... already exists!" for each and every file that was open in the previous session.
Can you make this Vim recovery prompt smarter? (Without switching off recovery!) Specifically, I'm thinking of:
- If the swapped version does not contain unsaved changes and the editing process is no longer running, can you make Vim automatically delete the swap file?
- Can you automate the suggested process of saving the recovered file under a new name, merging it with file on disk and then deleting the old swap file, so that minimal interaction is required? Especially when the swap version and the disk version are the same, everything should be automatic.
I discovered the SwapExists
autocommand but I don't know if it can help with these tasks.