Neovim Motions

0.10

Complete reference for Neovim movement and navigation commands

Official docs →

Motions are the verbs of Neovim's movement language. Every motion moves the cursor from one position to another, and that alone makes them useful — but the real magic is that motions compose with operators. d (delete) isn't a command on its own. w (word) isn't an edit. But dw? That's "delete to the start of the next word." Learn the motions on this page and you'll be able to combine them with d, c, y, >, <, =, gU, gu, and any other operator. The combinations multiply — a handful of motions and operators gives you hundreds of commands for free.

This page is the deep dive. If you want the overview, check the main Neovim cheatsheet.

Character Motions

The most basic motions. Your fingers live on these keys.

Character-Level Movement
h
Move left one character
j
Move down one line
k
Move up one line
l
Move right one character
gj
Move down one display line (for wrapped lines)
gk
Move up one display line (for wrapped lines)

You'll hear people say "never use the arrow keys." That's mostly about efficiency — hjkl keeps your hands on home row. But the real upgrade is that j and k accept counts: 5j moves down 5 lines. Arrow keys can't do that. Turn on relativenumber and you'll always know exactly what count to type.

Word Motions

Words are the most common unit of movement. Neovim has two definitions of a "word": a lowercase word (w, b, e) stops at punctuation, while a WORD (W, B, E) only stops at whitespace. Both are useful — lowercase for precision, uppercase for speed.

Word Movement
w
Jump to the start of the next word
b
Jump to the start of the previous word
e
Jump to the end of the current/next word
ge
Jump to the end of the previous word
W
Jump to the start of the next WORD (whitespace-delimited)
B
Jump to the start of the previous WORD
E
Jump to the end of the current/next WORD
gE
Jump to the end of the previous WORD

Consider the string obj.method(arg). With lowercase w, your cursor stops at obj, ., method, (, arg, ) — six stops. With uppercase W, it's just obj.method(arg) — one stop. Use W/B/E when you want to skip over dotted paths, URLs, file paths, or anything with punctuation you don't care about.

Line Motions

Moving within a line. These are some of the most-used motions in practice, especially 0, ^, and $.

Within a Line
0
Jump to the first column of the line (column 0)
^
Jump to the first non-blank character of the line
$
Jump to the end of the line
g_
Jump to the last non-blank character of the line
g0
Jump to the start of the display line (for wrapped lines)
g^
Jump to the first non-blank of the display line
g$
Jump to the end of the display line
+
Move to the first non-blank character of the next line
-
Move to the first non-blank character of the previous line
{count}|
Jump to column {count} on the current line

Find Motions (In-Line Search)

These are surgical. They search within the current line for a specific character and jump straight to it. They're also repeatable with ; and ,, which makes them even more powerful.

Character Find
f{char}
Jump forward to the next occurrence of {char} on the line
F{char}
Jump backward to the previous occurrence of {char} on the line
t{char}
Jump forward to just before {char} (till)
T{char}
Jump backward to just after {char}
;
Repeat the last f/F/t/T motion in the same direction
,
Repeat the last f/F/t/T motion in the opposite direction

f and t look similar but serve different purposes when combined with operators. df) deletes everything from the cursor through the ), including the parenthesis. dt) deletes everything up to but not including the ). This distinction is critical for precision editing — ct" changes text up to (but not including) the quote, leaving the quote in place. Think of t as "till" — it stops one character short.

Paragraph & Sentence Motions

These are your medium-range motions — bigger than words, smaller than the whole file. Paragraphs are separated by blank lines, which maps nicely to code blocks.

Paragraphs & Sentences
{
Jump to the previous blank line (paragraph backward)
}
Jump to the next blank line (paragraph forward)
(
Jump to the beginning of the previous sentence
)
Jump to the beginning of the next sentence
]]
Jump to next section / function start (depends on filetype)
[[
Jump to previous section / function start
][
Jump to next section end
[]
Jump to previous section end

{ and } are extremely useful in code. Functions and blocks are typically separated by blank lines, so } hops you from function to function. Combine with operators: d} deletes from the cursor to the next blank line — perfect for deleting an entire code block. v} visually selects it first if you want to review before acting.

Screen Motions

These move the cursor to specific positions on the visible screen, or scroll the screen relative to the cursor. They don't move through the file's text — they move through what you can see.

Cursor to Screen Position
H
Move cursor to the top (High) of the visible screen
M
Move cursor to the middle of the visible screen
L
Move cursor to the bottom (Low) of the visible screen
Scrolling the Screen
zt
Scroll so the current line is at the top of the screen
zz
Scroll so the current line is at the center of the screen
zb
Scroll so the current line is at the bottom of the screen
Ctrl-e
Scroll the screen down one line (cursor stays)
Ctrl-y
Scroll the screen up one line (cursor stays)
Ctrl-d
Scroll down half a screen
Ctrl-u
Scroll up half a screen
Ctrl-f
Scroll down a full screen (forward)
Ctrl-b
Scroll up a full screen (backward)

File Motions

These jump to specific positions in the file as a whole.

File-Level Movement
gg
Jump to the first line of the file
G
Jump to the last line of the file
{number}G
Jump to line {number}
{number}gg
Jump to line {number} (alternative)
%
Jump to the matching bracket: (), {}, []
Ctrl-o
Jump back in the jump list (your "back button")
Ctrl-i
Jump forward in the jump list
``
Jump back to position before last jump
''
Jump back to the line of the last jump
`.
Jump to position of last edit
'.
Jump to line of last edit
g;
Jump to previous position in the change list
g,
Jump to next position in the change list

Motions + Operators: The Composable Grammar

This is the core insight that makes Vim/Neovim click. Every command follows the pattern: operator + motion (or operator + text object). Here's how the math works.

Operator + Motion Examples
dw
Delete from cursor to start of next word
d$
Delete from cursor to end of line (same as D)
d}
Delete from cursor to next blank line
dG
Delete from cursor to end of file
dgg
Delete from cursor to start of file
df{char}
Delete from cursor through next {char} on line
dt{char}
Delete from cursor up to (not including) next {char}
cw
Change from cursor to start of next word
c$
Change from cursor to end of line (same as C)
ct)
Change from cursor up to the closing paren
y}
Yank from cursor to next blank line
yG
Yank from cursor to end of file
>}
Indent from cursor to next blank line
gUw
Uppercase from cursor to start of next word
Count + Operator + Motion
3dw
Delete next 3 words
d3w
Delete next 3 words (same thing, count can go either side)
5j
Move down 5 lines
2f{char}
Jump to the 2nd occurrence of {char} on the line
c2w
Change the next 2 words
y3j
Yank current line and 3 lines below
3>>
Indent current line and 2 lines below

The operators you know (d, c, y, >, <, =, gu, gU) work with every single motion on this page. You don't memorize dw, d$, d}, dG, df(, dt" as separate commands — you learn d once and combine it with any motion. That's the multiplier. If you know 7 operators and 20 motions, you have 140 commands. Learn one more motion, you get 7 more commands. This is why experienced Vim users barely think about keystrokes — they think in terms of "what do I want to do" and the grammar writes the command.

Related Tools