Vim Delete temp file

Source: Internet
Author: User

Use Vim to edit documents today after connecting to CentOS with Xshell

Because there was a temporary closure and no saving.

Once again open the VIM prompt to restore, but each time you open the file to restore, so found the following methods and the principle of vim work

Using VIM to edit the file is actually to copy a copy to the temporary file and map to the memory for you to edit, you edit the temporary file, not the source file, until you: W Save the temporary file to the source file, until you: Q exit to delete the temporary file.

Each time the VIM boot detects if there is a temporary file, there is a question about how to handle it.

You open two vim to operate the same file, the second VIM detects a temporary file when it starts, and asks you what to do with it.

If you have self-confidence, then R recover files and: Wq save exit, after ll-a Show hidden files, rm delete. The file name can be deleted.

Vim Delete temp file

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.