E325: ATTENTION Found a swap file by the name ".nginx.conf.swp" owned by: root dated: Sat Nov 26 14:54:35 2022 file name: /usr/local/nginx/conf/nginx.conf modified: YES user name: root host name: VM-0-16-centos process ID: 2160 While opening file "nginx.conf" dated: Sat Nov 26 15:15:54 2022 NEWER than swap file!
(1) Another program may be editing the same 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 file crashed. If this is the case, use ":recover" or "vim -r nginx.conf" to recover the changes (see ":help recovery"). If you did this already, delete the swap file ".nginx.conf.swp" to avoid this message. "nginx.conf" [converted] 122L, 2973C Press ENTER or typecommand to continue
原因分析:
在 Linux 下的 vim 编辑过程中,由于某种原因异常退出正在编辑的文件,再次编辑该文件时,会出现该提示。