VIM Programming Insert save do not exit save to exit without saving Save as another file name overwrite existing file

Source: Internet
Author: User

---restore content starts---

Write the code in Xshell, if you need to edit the code, you can enter vim+ xxx.py, enter the VIM editing interface

The xxx.py here represents a python storage file with a. py suffix.


1. Insert character input I can type or SHIFT + I

2. Save, but do not exit vim:w

3. Save and exit Vim:wq

4. Exit vim, but do not save changes: q!

5. Save with a different file name: w filename


6.  Save and overwrite the original file in an existing file: w! FileName

View mode in 7.vim, select the content to be commented on Ctrl + V

8. Insert # in front of the line to be commented (shown in the first line) SHIFT + #

9.ESC; Press ESC at least 2 times, and all selected rows are preceded by a #

---restore content ends---

VIM Programming Insert save do not exit save to exit without saving Save as another file name overwrite existing 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.