Using VIM to open a file always appears swap file ". Nginx.conf.swp" Already exists!

Source: Internet
Author: User

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/1711025

Using VIM to open a file always appears swap file ". Nginx.conf.swp" Already exists!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.