3

I want to have swap files for manual inspection if needed, i.e. I don't want ViM to ask me every time I have a swap file if I want to recover / edit, etc. but I do want to have the option to manually pop up this prompt when I want to (e.g. when I had a shutdown before saving)

Is it possible? Didn't find what I was looking when I read :help backup, :help swap

CIsForCookies
  • 283
  • 2
  • 9

1 Answers1

0

I think that I have already implemented this functionality.

set shortmess+=A

au SwapExists * nested call OnSwap() function! OnSwap() let swap_info = swapinfo(v:swapname) echo "Recovery exist " . strftime("%Y %b %d %X",swap_info['mtime']) let v:swapcommand='e' endfunction

The first command doesn't display the message.

eyal karni
  • 1,106
  • 9
  • 33