3 ms·
Even vim has a visual block selection mode. <ctrl-v> at the top of the block, then move down (j or down arrow) to the bottom. That marks the block. Then type th
by tyingq 9y ago
Even vim has a visual block selection mode. <ctrl-v> at the top of the block, then move down (j or down arrow) to the bottom. That marks the block. Then type the I character (insert in front of cursor), type the comment character, and press <esc>. Once you press <esc>, the inserted comment character action is repeated for the whole block.
Or non-visual block select...V% with cursor on the opening {.
- wruza 9y agoOh, my :vmap <M-/> :s|^|//|<CR> :vmap <M-\> :s|^//||<CR> (writing from memory, may need tuning)