with vim, there are two common causes of errors:
(1) when you use multiple programs to edit the same file.
(2) non-regular exit.
The following information is prompted:
E325: attentionfound a swap file by the name ". Old.txt.swp" owned by: root dated: tue mar 2813:27:34 2017 file name: /tmp/old.txt modified: YES user name: root host name:oldboy38 process ID: 6855While opening file "Old.txt" dated: tue mar 28 13:27:10 2017 (1) Another program may be editing thesame file. If This is the case, be careful not to end up with two different iNstances of the same file when making changes. quit, Or continue with caution. (2) an edit session for this filecrashed. if this is the case, use ": Recover" or "Vim -rold.txt" to recover the changes (see ": Help recovery"). if you did this already, delete the swap file ". Old.txt.swp" to avoid this message. swap file ". Old.txt.swp" already exists! [o]penread-only, (E) dit anyway, (R) ecover, (D) elete it, (Q) uit, (A) bort:
(1) (2) for the official solution:
(1) to avoid creating two different versions of the same file, it is recommended that you select "(Q) uit" or continue to carefully modify the selection "(E) dit anyway".
(2) You can also select "(R) ecover" or "vim-r filename" to revert to unmodified before deleting the SWP file (this time make sure your SWP the file is useless).
The meaning of the following option:
O: read-only, cannot be changed
E: can be changed, the previous changes have been lost
R: Restore ( previous modification )
D: by deleting ( deleting . SWP file, file recovery before modification )
Q: Exit
A: Give up
Specific solutions:
(1) do not want to keep the original modified content directly select D .
(2) want to keep the original modified content select R to copy the modified content to save, and then exit the file delete awp file. (the AWP file defaults to hidden files, and is viewed with the ls-a command and deleted with the RM command.) )
Workaround for incorrect prompt after turning off vim editor