How to recover after Kate crashes

crashdata-recoverykate

I use Kate for coding and note-taking. Sometimes it crashes – often when I've got a lot open. Unsaved 'real' documents (eg, ones backed by files, that have been saved at some point) usually have a backup/autosave type recovery file, that more-or-less works. Unfortunately, I've gotten in the habit of using untitled buffers (eg, pressing Ctrln in Kate) to store temporary notes.

Kate just crashed and I lost half a dozen of these. Does Kate store backups for 'new' files anywhere? I checked, ~/.kde/share/apps/kate/ and didn't see anything obvious …

kate-editor 3.8.5
KDE 4.8.5
Ubuntu 12.04 (Don't remember if Kubuntu or Ubuntu + KDE, in case that makes a difference)

Best Answer

Being one of the Kate Developers, I can explain the workflow like this:

When Kate or the system crashes, you loose all text buffers that were never saved. However, if you are working on a text file (that exists as file on disk), a swap file is created next to the file, called .filename.kate-swp. Now, if Kate starts again, Kate searches for these swap files. If found it replicates all edit actions that were recorded in this swap file, and your data is fully restored.

Rule of thumb: Always (and I repeat: alawys) work with files, not unsaved text buffers. That is good practice with everything you do on a Computer.

Related Question