How the Vim editor adds or removes multiple lines of comments

Source: Internet
Author: User

One, the method of annotating multiple lines

1. Enter the Vi/vim editor and press CTRL + V to enter visual mode (visual BLOCK)

650) this.width=650; "Src=" Https://s1.51cto.com/oss/201711/13/b033cb353db60f719cc34684e260a3c2.jpg-wh_500x0-wm_3 -wmp_4-s_411904114.jpg "title=" 11.jpg "alt=" B033cb353db60f719cc34684e260a3c2.jpg-wh_ "/>

2. move the cursor up or down, select the beginning of multiple lines, as shown in

650) this.width=650; "Src=" Https://s1.51cto.com/oss/201711/13/bd604d211ef26ba336a773aeb2c1c13a.jpg-wh_500x0-wm_3 -wmp_4-s_2931381762.jpg "title=" 12.jpg "alt=" Bd604d211ef26ba336a773aeb2c1c13a.jpg-wh_ "/>

3, When you are finished, press the I key in uppercase, and you will be prompted to enter the "insert" mode at the bottom, entering the annotation you want to insert, such as #

650) this.width=650; "Src=" https://s2.51cto.com/oss/201711/13/2e740373e377f5646cfb5416b5e83008.jpg-wh_500x0-wm_ 3-wmp_4-s_2311170384.jpg "title=" 13.jpg "alt=" 2e740373e377f5646cfb5416b5e83008.jpg-wh_ "/>

4, Finally, press the ESC key two times, and you'll notice that multiple lines of code have been annotated

650) this.width=650; "Src=" https://s3.51cto.com/oss/201711/13/c690dbb6c9e847f9b42ce444defdf041.jpg-wh_500x0-wm_ 3-wmp_4-s_27463382.jpg "title=" 14.jpg "alt=" C690dbb6c9e847f9b42ce444defdf041.jpg-wh_ "/>

Two, uncomment multiple lines

       also CTRL + V into the column selection mode, move to the cursor to select the comment, press D, the comment is deleted.

650) this.width=650; "Src=" Https://s1.51cto.com/oss/201711/13/535da0b69214b019332f13ac3dc2606b.jpg-wh_500x0-wm_3 -wmp_4-s_734339767.jpg "style=" Float:none; "title=" 15.jpg "alt=" 535da0b69214b019332f13ac3dc2606b.jpg-wh_ "/>

650) this.width=650; "Src=" Https://s1.51cto.com/oss/201711/13/5c6a4be9f15017de1491fbb5c810d3d6.jpg-wh_500x0-wm_3 -wmp_4-s_1213376366.jpg "style=" Float:none; "title=" 16.jpg "alt=" 5c6a4be9f15017de1491fbb5c810d3d6.jpg-wh_ "/>



This article is from the "surgery industry has specialized" blog, please be sure to keep this source http://fuvip.blog.51cto.com/9276123/1981226

How the Vim editor adds or removes multiple lines of comments

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.