4,460
edits
Keyboard shortcuts |
→Adding comments to a block: add more ways to comment a block |
||
Line 16: | Line 16: | ||
= Adding comments to a block = | = Adding comments to a block = | ||
== Method 1 == | |||
Grab lines with visual block and then <code>:norm i#</code> to comment, and then <code>:norm x</code> or <code>:norm ^x</code> with indentation. | Grab lines with visual block and then <code>:norm i#</code> to comment, and then <code>:norm x</code> or <code>:norm ^x</code> with indentation. | ||
== Method 2 == | |||
'''Commenting a block''' | |||
# Ctrl-v and select multiple lines to comment | |||
# Shift-I | |||
# Add comment characters to add and then press Esc | |||
'''Uncommenting a block''' | |||
# Ctrl-v and select the block to uncomment | |||
# press x | |||
= .vimrc = | = .vimrc = |