Visual-Line Mode


The second of Vim's visual modes is called visual-line 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-line mode by pressing V:

Enter Visual-Line ModeV
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-LINE40%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-LINE60%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), and includes all content from the line that contains the starting cursor.

  2. The selection ends at the lower-most cursor location (the current cursor location), and includes all content from the line that contains the ending cursor,

  3. All lines between the two cursor locations (if present) are included in the selection.