How to Comment Multiple Lines in Vi
- select the first caracter of your block
- press Ctrl+V ( this is rectangular visual selection mode)
- type j for each line more you want to be commented
- type Shift-i (like I for “insert at start”)
- type // (or # or " or …)
- you will see the modification appearing only on the first line
- IMPORTANT LAST STEP: type Esc key, and there you see the added character appear on all lines