Sometimes when you open a file with Vim, you are prompted with information similar to the following:
E325: note
Discovery Interchange File ". Exportcert.cpp.swp"
Owner: Liuchuanliang Date: Thu Mar 1 17:15:41 2012
File name: ~liuchuanliang/ftsafe/entersafe-shuttle-linux-111114/i386/sample2/source/exportcert/exportcert.cpp
Modified: Yes
User name: Liuchuanliang host Name: Liuchuanliang-desktop
Process id:4434
Opening file "Exportcert.cpp"
Date: Thu Mar 8 10:56:17 2012
Newer than swap files!
(1) Another program may also be editing the same file.
If so, be careful to avoid creating two different versions of the same file when you modify it.
Exit, or proceed with caution.
(2) Crash when this file was last edited.
If this is the case, please use ": Recover" or "vim-r exportcert.cpp"
Restore the modified content (see ": Help Recovery").
If you have already recovered,to avoid seeing this message again.
Interchange file ". EXPORTCERT.CPP.SWP" already exists!
Open as read-only ([O]), direct edit ((E)), Restore ((R)), Delete interchange File ((D)), Exit ((Q)), Abort ((A)):
This is because when you open a file with Vim, It will produce a filename.swap file for saving the data, when the file is not properly closed, the file can be used to recover, when the normal shutdown, the file will be deleted, abnormal shutdown, will not be deleted, so there is a. swap file, you can restore the file:
Vim-r filename.c
After the recovery, delete the. swap file, and when you open it, do not use the prompt, note that the. swap file is a hidden file. Available: La view. The. begins with a hidden file.
Linux modified the file when the crash, produced a. swap file, how to fix it?