Visual-Block Mode


The last of Vim's visual modes is called visual-block mode, and is demonstrated using the following buffer:

Initial Conditions
I·have·always·believed,·and·I·still·believe,
that·whatever·good·or·bad·fortune·may·come·our·way
we·can·always·give·it·meaning·and
transform·it·into·something·of·value.
NORMAL40%2:5
 

Enter visual-block mode by pressing C-V:

Enter Visual-Block Mode<C-v>
I·have·always·believed,·and·I·still·believe,
that·whatever·good·or·bad·fortune·may·come·our·way
we·can·always·give·it·meaning·and
transform·it·into·something·of·value.
V-BLOCK40%2:5
 

Finally, move the cursor to another location in the buffer.

Define Current Selectionj3w
I·have·always·believed,·and·I·still·believe,
that·whatever·good·or·bad·fortune·may·come·our·way
we·can·always·give·it·meaning·and
transform·it·into·something·of·value.
V-BLOCK60%3:20
 

The key observations are:

  1. The selection starts from the upper-most cursor location (the cursor location when the editor entered visual mode),

  2. The selection ends at the lower-most cursor location (the current cursor location),

  3. The selected content contains text that exists between the start and end of the selection, but only from columns that are also between the starting and ending cursor locations.