Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Feature Request: Remove .swp file #7

jgandt opened this Issue · 4 comments

2 participants

Jeff Gandt chrisbra
Jeff Gandt

So I would love to use this plugin more, but I find myself skipping it and just editing or recovering manually.

My main issues is that i often just want to discard the .swp file. However, the diff is awesome to confirm that I'm not losing anything.

So instead of having to %diffg and then :FinishRecovery, it would be nice to have a ":TakeOnDiskVersion" or some such which simply removes the .swp and edits the on-disk version.

P.S. :FinishRecovery collides with :finish. kind of a pain...

Feel free to disregard. =)



Thanks for the suggestion. I am not sure, I understand exactly what you want, but does commit b23b1d3 do what you want?

Jeff Gandt

The linked commit partially does what I want.

Let me come at it from a different angle.

Can you provide the diff counts when you prompt the user whether or not to show the diff buffer?

That is, when you detect that there is a swp file, pre-diff the swp and the on-disk version to check for differences.

Then, display the diff count between the two and notify the user if the swp and the on-disk are the same or different.

This would allow the user to quickly make a determination if they should even view the diff buffer.

This comes into play when you maybe lost a vim session and you don't come back to the project for a while. This would allow a user to say "oh man, DID that swp file contain any changes? Oh, it's the same as what is on disk so I'll just delete the swap and move on." OR: "oh yeah, it looks like there are some differences so I should launch the diff buffer and check what I changed and what I would lose if I just deleted the diff buffer."

Does this make sense?

Please let me know if I need to clarify more.


chrisbra chrisbra referenced this issue from a commit
chrisbra fix issue #7
check, whether the files differ and let the user directly delete old
non-modified swapfiles
Jeff Gandt

Hi Christian,

The feature works exactly as expected.

Thanks so much for the quick turnaround.


chrisbra chrisbra closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.