Re-Select โ€” gv

Bring back the exact selection you just dismissed.

Keys: gv

gv re-enters visual mode with the same selection you last had โ€” same shape, same endpoints. Essential for re-applying an operator to the same region.

gv โ€” Re-Select

gv re-enters visual mode with the exact same selection you last had โ€” same shape, same lines, same characters.

Re-indent without re-selecting
KeyNote
{key:V}{key:5}{key:j}Select 6 lines
{key:>}Indent โ€” selection lost
{key:g}{key:v}Bring it back
{key:>}Indent again
{key:g}{key:v}{key:>}Or just gv> repeatedly

Worked example โ€” gv

Re-select the previous visual region.

Step 1 ยท
visual.gv
Step 2 ยท vw ยท Selected 'dolor '.
Selected 'dolor '.
Step 3 ยท U ยท U โ€” uppercased the selection.
{key:U} โ€” uppercased the selection.
Step 4 ยท gv ยท gv โ€” same region selected again.
{key:g}{key:v} โ€” same region selected again.

gv is great for chained visual operations.

โ–ถ Try this in the simulator

Watch

See also: Visual + Ex Range, Operators on Visual Selections