Vim's visual modes are used to "visually select" content within a buffer. Vim has three different variations of visual mode, where each option interprets the selection region slightly differently from the others.
The first mode is simply called visual mode. Consider the following buffer:
Enter visual mode by pressing v:
Finally, move the cursor to another location in the buffer.
The key observations are:
-
The selection starts from the upper-most cursor location (the cursor location when the editor entered visual mode), and includes all content to the right of the starting cursor location.
-
The selection ends at the lower-most cursor location (the current cursor location), and includes all content to the left of the ending cursor location,
-
All lines between the two cursor locations (if present) are included in the selection.