How do I switch between charwise, linewise, and blockwise visual mode without losing my selection?
Answer
<C-v> (in visual mode)
Explanation
Once you are in any visual mode, pressing v, V, or <C-v> switches to charwise, linewise, or blockwise visual mode respectively — without cancelling the current selection. This means you never need to escape and reselect when you realise you grabbed the wrong kind of region.
How it works
Vim's visual mode keys act as toggles between subtypes when already in visual mode:
| Currently in | Press | Result |
|---|---|---|
charwise (v) |
V |
switch to linewise |
charwise (v) |
<C-v> |
switch to blockwise |
linewise (V) |
v |
switch to charwise |
linewise (V) |
<C-v> |
switch to blockwise |
blockwise (<C-v>) |
v |
switch to charwise |
blockwise (<C-v>) |
V |
switch to linewise |
Pressing the same key you're already in (e.g. v while in charwise) exits visual mode instead.
Example
- Press
vand move to select a few characters - Realise you need whole lines — press
Vto switch to linewise without reselecting - Realise you actually need a column block — press
<C-v>to switch to blockwise
The selection anchors adjust to fit the new visual type automatically.
Tips
- After an operator (like
dory),gvreselects the last visual region in its original type — useful if you want to operate again. - Switching to blockwise mid-selection is especially handy after selecting a region with
aporip, so you can then prepend to a column withI.