If the file opened by vim is accidentally lost, how to retrieve the file
In the process of editing the file, Vim will automatically generate a temporary swap file ending in .swp in the current directory to back up the contents of the buffer.
Reference article:
http://yyq123.blogspot.com/2012/03/vim-swap.html