vim multi-line comment and delete

1. Multi-line comments

1. First press esc to enter the command line mode, press Ctrl + v to enter the column (also called block) mode;
2. Use the up and down keys at the beginning of the line to select multiple lines that need to be commented;
3. Press the keyboard (uppercase) "I" key to enter insert mode;
4. Then enter a comment ("//", "#", etc.);
5. Finally press the "Esc" key twice

2. Delete multi-line comments

1. First press esc to enter command line mode, press Ctrl + v to enter column mode;
2. Select multiple lines to be uncommented;
3. Press "x" or "d" (if you enter a capital D, will delete all marked lines)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325913007&siteId=291194637