How do I move the cursor to the other end of a visual selection?
o (in visual mode)
While in visual mode, pressing o swaps the cursor to the opposite end of the selection.
27 results for "visual mode o"
o (in visual mode)
While in visual mode, pressing o swaps the cursor to the opposite end of the selection.
O in visual block mode
In visual block mode (), pressing O (uppercase) moves the cursor to the diagonally opposite corner of the rectangular selection.
O (visual block mode)
In visual block mode (), pressing O (uppercase) moves your cursor to the other end of the current line — letting you expand or contract the block's horizontal
o (visual mode)
In visual mode, pressing o swaps the cursor between the two ends of the selection (the anchor and the free end).
v_o
When you start a visual selection, the cursor is at one end and the anchor is at the other.
o in visual mode
While in visual mode, press o to move the cursor to the opposite end of the selection.
o (in Visual mode)
When you make a Visual selection in Vim, the cursor sits at one end while the other end is anchored.
O
The O (uppercase) command opens a new blank line above the current line and places you in insert mode, ready to type.
v + repeated iw/aw/i(/a(/ip/ap
Once you enter visual mode, you can progressively expand your selection by typing increasingly larger text objects.
visual-mode #visual-mode #text-objects #editing #selection #productivity
v3aw
In visual mode, repeating text object motions progressively expands the selection.
<C-v>$
In visual block mode, pressing $ extends the selection to the end of every line, even when lines have different lengths.
80i-<Esc>
Vim's insert commands accept a count prefix that repeats everything you type.
v
The v command enters character-wise visual mode, letting you select text one character at a time.
qaI<li><Esc>A</li><Esc>jq
This macro wraps each line in tags by inserting the opening tag at the start and appending the closing tag at the end.
<C-v>
The (Ctrl+v) command enters visual block mode, which lets you select a rectangular column of text across multiple lines.
gg
The gg command moves the cursor to the first line of the file.
X
The X command deletes the character to the left of the cursor (before it).
gv
The gv command reselects the exact same area that was last selected in visual mode.
v{motion}<C-g>
Vim has a lesser-known select mode that behaves like selection in typical GUI editors: any typed character replaces the selection.
viw
How it works The command viw selects the word under the cursor in visual mode.