Jan 062010
How to comment out a large block of lines in vi?
Answer:
- Type Ctrl + V to enter VISUAL BLOCK mode
- Move up or down to select the lines you want to comment out
- Type :, it will show out :'<,'>
- Type at the end of line s/^/#/g
Press enter and that's all.