gioele / vim-autoswap

Please Vim, stop with these swap file messages. Just switch to the correct window!
Creative Commons Zero v1.0 Universal
115 stars 25 forks source link

What to do with read-only file? diff? #16

Open ddickstein opened 6 years ago

ddickstein commented 6 years ago

In cases where vim crashes and a newer swapfile exists, a readonly version of the file opens. I understand this is by design. What if I want to see the swapfile, or override the readonly version with the new one? Ideally whenever this happens I'd like 2 panes to open, one with the swapfile and one with the old version, and be able to do a side-by-side comparison and pick between them. What's the best way to achieve this?

jflorian commented 5 years ago

Seems like the appropriate thing would be to call :recover. Almost everything I edit these days is under Git so I can sort of cheat and just write the recovery out, exit and use git diff to see if I really want it or not. Vim probably can do some of this on its own, but I use what I know. :man_shrugging: