VIM/VI editing tools for multi-line comments and uncomment

Source: Internet
Author: User
Tags delete key
System: Linux

Multi-line Comments:

  1. Go to command line mode--

  2. Move the cursor to the first line where you want to comment-

  3. Press CTRL + V to enter Visual block mode--

  4. Press the letter J, or K (or move the key up or down) to select the line that needs to be commented--

  5. Press the capital letter I to enter insert mode--

  6. Enter a comment symbol, such as # # (you need to add a few columns to enter a few)--

  7. Press the ESC key to annotate multiple lines.


To cancel a multiline comment (delete a comment):

  1. Go to command line mode--

  2. Move the cursor to the first column of the first row where you want to uncomment--

  3. Press CTRL + V to enter Visual block mode--

  4. Select the number of columns in the lowercase letter h or L to select the rows by the lowercase letter J or K (you can also use the upper and lower left and right move keys)-

  5. Press the D key or the DELETE key to uncomment multiple lines.


VIM/VI editing tools for multi-line comments and uncomment

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.