Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [crash-recovery]

The tag has no usage guidance.

3
votes
1answer
2k 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 ...
5
votes
1answer
608 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 ...
0
votes
1answer
252 views

recover file destroyed by old .swp file

I saved and closed a file I was editing. When I opened it again a minute later, vim gave the warning that appears when a .swp file is present. I selected the recover option, but the "recovered" file ...
9
votes
1answer
591 views

Can a text file be recovered only from the .*.swp file?

I was remotely editing a new file: man-01-Intro.txt but the machine went down before I wrote it to disk so only the swp version was conserved. Is there anything that I can do to recover the work ...
2
votes
3answers
642 views

How to show all unsaved files opened in vim?

I'm not sure if I should ask this problem on vim or on Linux/Ubuntu forum. The thing is, I opened multiple terminals on my desktop, and several of them opened various of *.txt files. Not all of them ...
65
votes
1answer
32k 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 ...
28
votes
7answers
7k 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 ...
13
votes
3answers
2k 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?