chrisbra / Recover.vim

A Plugin to show a diff, whenever recovering a buffer
http://www.vim.org/scripts/script.php?script_id=3068
248 stars 25 forks source link

Open read-only option #14

Closed rking closed 11 years ago

rking commented 12 years ago

Sometimes you know why there's a swap file and don't care, so it'd be nice if you didn't have to hit 'a' then 'o' to get to a read-only view.

chrisbra commented 12 years ago

Simply hitting 'N' for (No) will open the file read-only.

rking commented 12 years ago

Aha. Could we update the output so this is clear?

I'm thinking the prompt should be not all on one line, so it could have a (colorized?) list of the short commands on the left, then up to a full sentence describing its behavior to the right.

chrisbra commented 12 years ago

Have made it clearer with commit a065f94

rking commented 12 years ago

Looking good.

A definite suggestion would be to replace: (O)pen (R/O) with (O)pen read-only

(Currently it almost looks like R is a command)

I also still advocate the idea of my comment above, where they're laid out in a list like:

Swap File 'spec/unit/.ebay_listing_spec.rb.swp' found:
- Swap and on-disk file seem to be identical
(D)iff
(O)pen read-only
(E)dit
(Q)uit
Dele[t]e
>

Plus I'd definitely like to see colors. ☺

chrisbra commented 12 years ago

Hmm, I tried it, but it looks weird. Try commit 63f1ef1, but I am pretty sure I'll revert it. I'll try to create a patch for confirm() that will color the choices. Maybe Bram includes it, that might be better.

chrisbra commented 11 years ago

reverting for now. Hopefully Bram includes my patch https://groups.google.com/group/vim_dev/msg/095bbc6b88276965