Friday, December 30, 2011

Comment out multiple lines in vi

Press Ctrl-v to start a VISUAL BLOCK
Move the cursor (up/down arrow key) to expand the block
Press I (Shift-i) to start insert.
Type in the character(s) that you want to insert, such as #, or //.
Press ESC to leave the visual block.

No comments:

Post a Comment