Questions tagged [crash-recovery]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
13
votes
3answers
3k views

How can I prevent Vim from leaving too many files (like swap, backup, undo)?

By default, vim leaves swap files in my project directory, and on crashes it leaves backup files. Can I prevent this? Or do I need to update all my projects' .VCSignore file?
101
votes
1answer
70k views

What is the purpose of swap files?

When I edit files, Vim tends to create files named .filename.swp, which I find annoying. From vim -h, I see that the -n option suppresses the creation of swap files. Is there a vimrc directive that ...
40
votes
9answers
16k views

Is it possible to make Vim auto-save files?

Some word processors and text editors auto-save the files we're editing from time to time, which is very convenient for surviving from nasty crashes, etc. Is there a way to make Vim auto-save our ...
15
votes
3answers
8k views

How do you view the diff of a swap file without quitting `vim`?

I have a way to handle swap files. And it works but it takes a while. Here goes: First I try to find the original vim session -- track down if the PID is still alive -- and if the PID is still ...
6
votes
1answer
2k views

Automatically delete swap file if it matches the saved file

As a developer who grew up on hardware with no MMU I have a habit of saving my work often, usually after every insert. Thus, when presented with the recovery dialogue after a crash or disconnect there ...