Vim / Neovim Visual Mode, Block Editing, Registers, and Marks

Select text precisely, edit columns, control registers, and jump back to saved positions.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
## Visual modes
Characterwise visual mode
v

# Select arbitrary text regions.

Linewise visual mode
V

# Select whole lines.

Blockwise visual mode
<C-v>

# Select a rectangular text block.

Reselect last visual selection
gv

# Bring back the last selected region.

## Visual block editing
Insert at start of block
<C-v> ... Itext<Esc>

# Add text to the start of many lines at once.

Append at end of block
<C-v> ... Atext<Esc>

# Add text to the end of many lines.

Replace a rectangular block
<C-v> ... rX

# Overwrite a visual block with one character.

## Registers and marks
Paste after or before cursor
p  P

# Put text from the default register.

Use a named register
"ayy  "ap

# Yank or paste from a named register.

List register contents
:registers

# Inspect available registers.

Set and jump to a mark
ma  `a  'a

# Bookmark a file location and return later.

Recommended next

No recommendations yet.