chrisbra/Recover.vim

Change "on-disk version" to something more precise

Closed this issue · 5 comments

After doing a recover-diff, the manually-saved file is referred to as name-of-file (on-disk version). However, I find this wording ambiguous, because both the manually-saved file and the .swp file are "on disk".

I was wondering whether this could be changed to something more precise, perhaps manually-saved version?

No it is not ambigous. One file has been recovered (and is not from disk), the other one is the one from disk. I think that is clear.

Sorry, it might just be me being ignorant, but this is still unclear to me. Even after the .swp file has been recovered, then it is still present "on disk", isn't it (until it's deleted)? Surely there are two versions saved "on disk"?

The swap file is on disk, but the recovered version has not been written to disk yet.

I still don't totally understand the distinction. Are you suggesting that the "recovered" version isn't "on disk", because it is not literally the .swp file (which is on disk)? i.e. the recovered file is merely a "decoded" version of the .swp file? Even so, I still find it confusing. Even though it's arguable that since the "manually-saved" version is plain-text, it's less "decoded", it's not like it's still not still encoded somehow. Unless I'm missing the point completely.

I spent an hour or two trying to 'debug' this.

I'm not very experienced with git, and when I went to check my status, I saw something that looked like:

Untracked files: lib/foo/bar/file.prog (on-disk version), and naturally, as I hadn't created any such files, and not knowing any better, I thought this was some obscure feature of git! Cue a long, frustrating session of me trying to remove this file via the git TUI.

Between

  1. This name which looks like another program's annotation in any other context
  2. Plonking this file in my working folder instead of giving me control over its location
  3. Not doing anything with the new file after recovery
  4. And not mentioning how and where the new file's gonna be created in the README

I think there's room for a better user experience (if anyone's feeling creative about it, of course.)

That said... with Recover.vim I still have something a mile better than the vanilla UX, my God are swap files a pain in the arse. Thanks for making it! 😃