Editing multiple lines at the same column is common (indentation, commenting). Character/line selection can’t handle this — you need column-based selection.
Block-wise visual mode (<C-v>) selects rectangular columns across multiple lines. This enables simultaneous edits to many lines at once.
Entry: <C-v> from Normal mode (or <C-q> on Windows if clipboard interferes)
Use cases:
-
Comment multiple lines:
0— go to first column<C-v>— start block selection<C-d>— move down (orjjj,%, etc.)I-- [ESC]— insert comment prefix on each line
-
Append to all lines:
<C-v>select blocks- Move to target lines
$— extend to end of linesA, type text,ESC
Window commands:
<C-w><dir>— switch split (dir = h,j,k,l or arrows)<C-w>_— maximize horizontal split<C-w>|— maximize vertical split<C-w>+/<C-w->— resize splits
- Block selection persists during operations
- All selected lines get the same edit
- Case matters:
<C-v>is block,Vis line,vis character - Works with
:splitand:vsplitfor window splits
- Windows:
<C-q>if<C-v>is clipboard paste $selects to end of longest line, not each line individually- Block selection combined with
Aappends at line ends
- Visual Selection — Block selection is a variant
- Macros — Can record block selection operations
- Text Objects — Alternative selection syntax
- Vim Splits — Related window functionality