There are several ways you can comment and uncomment a range of lines in vim editor.
Method I (easiest)Step 1: Make sure your are in command mode by pressing Esc key
Step2: Move your cusor to the start of the starting line of the block that you want to comment out
Step 3: Press upper case I (shift + i)
wait a sec and it's done!