Questions tagged [crash-recovery]
The crash-recovery tag has no usage guidance.
12
questions
0
votes
0
answers
34
views
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 ...
2
votes
2
answers
187
views
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 "...
0
votes
0
answers
57
views
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 ...
0
votes
1
answer
586
views
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 ...
21
votes
4
answers
11k
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 ...
8
votes
1
answer
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 ...
0
votes
1
answer
419
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
1
answer
3k
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 ...
3
votes
3
answers
4k
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 ...
103
votes
2
answers
83k
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 ...
45
votes
10
answers
19k
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 ...
14
votes
3
answers
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?