Pages

Monday, June 3, 2013

comment multiple lines in vim


  1. keep the cursor on the first letter of first line to comment

  2. in command mode, press ctrl + v

  3. move cursor down until last line to comment

  4. press I (you may not see vim going to insert mode, don't worry, you will see cursor moving to first line)

  5. press # (you may not see # inserted yet, don't worry)

  6. press Escape ( you should see lines commented out, otherwise, press escape two times)

No comments:

Post a Comment