Vim Common operation

Source: Internet
Author: User

One or two modes

There are two main modes of Vim, Normal mode and insert mode.

Normal mode---insert mode can be edited like a normal editor by pressing I into insert mode

Insert mode--Normal mode by pressing ESC into normal mode, you can do a lot of things in normal mode

Ii. Common Commands

The common commands listed below are all used in normal mode

    1. I: Enter insert mode, press ESC to return to normal mode
    2. X: Delete the character where the cursor is located
    3. DD: Delete the current line, and put the deleted content into the Clipboard, you can directly paste, in fact, the equivalent of cutting
    4. YY: Copy when moving forward
    5. P: Paste after the current line
    6. P: Paste before the current line
    7. A: Insert after cursor
    8. o: Insert a new row after the current line
    9. O: Insert a new row after the current line
    10. CW: Remove the character from the cursor to the end of the word
    11. 0: Jumps to the first column of the row where the cursor is located
    12. ^: Jump to the first non-null character of the bank
    13. $: Jump to the end of the bank
    14. G_: Jumps to the last non-null character of the bank
    15. /pattern: Searching for pattern
    16. U: Cancel
    17. Ctrl-r: Recovery
    18. : E < file path >: Open
    19. : w: Save
    20. : SaveAs < file path >: Save to this file
    21. : Wq: Save and exit
    22. : q! : Exit but do not save

Vim Common operation

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.