Failure: When using vim to edit the Nginx configuration file, there has been a SWP file already exists:
When you use Vim to edit a file, a SWP file is generated
. Filename.swp
The file will be deleted automatically at the end of the normal edit exit.
If you accidentally delete the original file, you can use Vim-r FILENAME, is to use the SWP file to restore the original file (if the system does not restart, after the system restarts, the file will disappear)
In general, there are two reasons why this problem occurs when you open a file with vim:
1. The file is now open
In this case, you can use read-only mode to open
2. Because the SWP file exists, it may have been caused by a crash in the last edit
Rm. FILENAME.SWP can delete the file (make sure that the file is not used for recovery)
This article is from the "Zxcvbnm Xuan ye" blog, please be sure to keep this source http://10764546.blog.51cto.com/10754546/1719309
Using VIM to open a file always appears swap file ". Nginx.conf.swp" Already exists!