Vim / Neovim Basics: Modes and Navigation

Core modal editing concepts, motions, and movement commands for everyday editing.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
## Core modes
Enter insert mode
i  a  I  A  o  O

# Start typing before or after the cursor.

Return to normal mode
<Esc>

# Leave insert or visual mode.

Enter command-line mode
:

# Run Ex commands such as write, quit, and substitutions.

## Essential motions
Move with home-row keys
h  j  k  l

# Navigate left, down, up, and right.

Move by words
w  b  e

# Jump by word starts and ends.

Move to line edges
0  ^  $

# Jump to line start or end.

Jump within file
gg  G

# Move to the top or bottom of the buffer.

Jump to matching delimiter
%

# Move between matching brackets, braces, or parentheses.

## Scrolling and viewport
Half-page scrolling
<C-d>  <C-u>

# Scroll quickly without losing context.

Center current line
zz

# Recenter the viewport around the cursor line.

Move line to top or bottom of screen
zt  zb

# Reposition the viewport around the current line.

Recommended next

No recommendations yet.