Vim commonly used

Source: Internet
Author: User

Vim common function record.

There are too many VIM commands to clean up for later viewing.

To delete a blank line:

: G/^\n*$/D

Description main Find ^\n, then, and then delete. D is the delete command.

Full-text inversion:

: global/^/m 0

Word Statistics:

:%S/WORD//GN

Description: When used, you can replace Word with any word.

Article Sort:

: Sort//Use field order by default.

: sort n//sorting using 10 binary digits

Of course, you can also sort by using 8-binary, 16-binary data.

View history Commands:

Q: The command line opens.

: ↑ or ↓ to look over.

Inserting comments

12,15 s/^/#/g Comment 第12-15 Line

Cancel Comment

12,15 s/^#//g dismiss 12-15 lines of comment

  

Vim commonly used

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.