8

Let's say I recovered a bunch of swapfiles in quick succession:

gvim -r .swv
gvim -r .swu
gvim -r .swt

And then cycled through them all a few times before finding that one of them was nonsense. I want to now know which swap file is represented by this buffer of useless contents, so that I may delete it so as not to have known garbage floating around on my hard drive. How can I switch to that buffer/window and then query the name of the swapfile associated with that particular buffer?

Thanks

1 Answers1

9
:swapname

This will show the filename of the swapfile for the current buffer. (For example: /c/path/.swu)

I found this (after a few tries) by typeing :swTAB.

I also found this question: VIM swap-file best practices?, which includes some other interesting and useful commands.

Thomas F
  • 256
  • 1
  • 2
  • 6