Skip to main content

Questions tagged [crash-recovery]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
104 votes
2 answers

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 ...
200_success's user avatar
  • 9,589
45 votes
10 answers

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 ...
thameera's user avatar
  • 17.6k
22 votes
5 answers

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 ...
Trevor Boyd Smith's user avatar
14 votes
3 answers

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?
Martin Tournoij's user avatar
9 votes
1 answer

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 ...
Víctor Luaña's user avatar
8 votes
1 answer

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 ...
pipe's user avatar
  • 239
5 votes
3 answers

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 ...
user3813057's user avatar
  • 1,481
2 votes
2 answers

I don't understand the logic of recovering crashed edit files

I don't understand the logic of recovering crashed edit files. I frequently get the message "swap file exists" or something like that, due to a crash. So Vim will say something like "...
Tyler Durden's user avatar
  • 2,131
0 votes
0 answers

Recovery doesn't recover what's in swap file

I have a file and three swap files, file.swn, file.swo and file.swp. I accidentally recovered using file.swp and then made some changes. However, I have some newer changes in file.swn which I'd like ...
rebolek's user avatar
  • 101
0 votes
0 answers

Recover content after accidental exit of the read-only mode using the view command

I've been working for quite some time now on a project, and one of the file got the read-only mode accidentally turned on, without me being aware of that. When i tried to write the file changes to the ...
xquilt's user avatar
  • 81
0 votes
0 answers

Why isn't vim recovering the most recent save

I'm having some graphical issues with my setup that means I sometimes need to restart my machine having not saved a file which is currently being edited in vim. However, the saved file which vim ...
algae's user avatar
  • 121
0 votes
1 answer

How to recover unsaved text without a swap file after Vim crashed?

I am using Vim 8 in WSL Ubuntu. While copying text into a file the terminal crashed. I don't believe it is the WSL as Task Manager does not show 'Not Responding'. I have tried using this answer which ...
Marcus's user avatar
  • 135
0 votes
1 answer

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 ...
Matthew Bedford's user avatar