I. Adding multiple lines of comments
1. Vim's command mode (ESC enters command mode):
2. Press CTRL + V to enter visual mode (visual BLOCK);
Note: The VIM command mode v enters the visual mode, CTRL + V. Enters the visual block, simple to choose visual differences such as:
3. Move the cursor and select the beginning of the multiline that needs to be commented;
4. After selecting, press Shift+i to enter the "Insert" mode and enter the comment symbol you want to insert.
5. Press ESC to annotate multiple lines of success;
Two. Deletion of multi-line annotations
Ctrl + V into the column selection mode, move the cursor to select multiple lines of comments, press D, delete succeeded.
Three. Use the Replace command to add multiple lines of comment
:% s/^/#/g #来在全部内容的行首添加 # comment
: 1,10 s/^/#/g #在1 The beginning of the start Add # comment
Four. Motion Diagram Demo
Vim adds or removes multiple lines of comment