Comment a block:
- go to first line of block
Ctrl+V
(orCtrl+Q
) to enter BLOCK mode- go to last line of block
- press
Shift+I
to enter INSERT mode - enter comment string, e.g.,
#
and pressESC
Uncomment a block:
- go to first line of block
Ctrl+V
(orCtrl+Q
) to enter BLOCK mode- go to last line/char of block
- press
x
to remove block
Taken from here: