After Vim opens the file, press CTRL + V to enter "VISUAL BLOCK" mode
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s2.51cto.com/wyfs02/m00/86/2a/wkiom1e2pxeiht6laaagbf17zxa065.jpg "title=" 1.jpg "alt=" Wkiom1e2pxeiht6laaagbf17zxa065.jpg "/>
Then press the arrow keys to select the line you want to add a comment to
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s2.51cto.com/wyfs02/m01/86/2a/wkiol1e2pzhxn0g1aaap4wf8a8o250.jpg "title=" 2.jpg "alt=" Wkiol1e2pzhxn0g1aaap4wf8a8o250.jpg "/>
Then press the capital letter I
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s4.51cto.com/wyfs02/m02/86/2a/wkiol1e2p0ndnacbaaaylghaevm489.jpg "title=" 3.jpg "alt=" Wkiol1e2p0ndnacbaaaylghaevm489.jpg "/>
Insert mode appears
Now you can insert characters, including inserting comment characters #
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s3.51cto.com/wyfs02/m01/86/2a/wkiom1e2p2wrvrysaaazwyk51ns008.jpg "title=" 4.jpg "alt=" Wkiom1e2p2wrvrysaaazwyk51ns008.jpg "/>
This time only changes the contents of a row, after the change is completed, press ESC to exit the Insert mode will not take effect on each selected line
-------------------------------------------------------------------------------------------
Delete Comment, enter--VISUAL BLOCK--mode to select the row to manipulate, press X directly to delete a character
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s2.51cto.com/wyfs02/m00/86/2a/wkiol1e2p37sa_xxaaakvnn97ak675.jpg "title=" 5.jpg "alt=" wKioL1e2p37SA_ Xxaaakvnn97ak675.jpg "/>
If you want to delete more than one character, you need to first select the row you want to manipulate, and then press the RIGHT ARROW key to select multiple characters
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s5.51cto.com/wyfs02/m02/86/2a/wkiol1e2p5itwaezaaaxiafv8ji852.jpg "title=" 6.jpg "alt=" Wkiol1e2p5itwaezaaaxiafv8ji852.jpg "/>
Select OK and press X to delete selected characters
This article from "Ronin" blog, reproduced please contact the author!
Vi/vim Multi-line comments, uncomment