Skip to content

Instantly share code, notes, and snippets.

@otkrsk
Created March 1, 2013 03:20
Show Gist options
  • Save otkrsk/5062243 to your computer and use it in GitHub Desktop.
Save otkrsk/5062243 to your computer and use it in GitHub Desktop.
Selecting and commenting multiple lines in Vim
1. Go to start of block.
2. `Ctrl+V`, then traverse down the block. Only the beginning of the line will be selected.
3. `Shift+I` to insert text at the beginning of the marker.
4. Press the hash/pound key (`#`), then escape (`Ctrl+[`). Your block of code will magically be commented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment