vimtricks.wiki Concise Vim tricks, one at a time.

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

  1. Press v and move to select a few characters
  2. Realise you need whole lines — press V to switch to linewise without reselecting
  3. 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 d or y), gv reselects 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 ap or ip, so you can then prepend to a column with I.

Next

How do I navigate quickfix entries, buffers, and conflicts with consistent bracket mappings?