Mission 09 / 52• Essential Motions

Moving by WORDs

Vim has two definitions of a word: a regular word (letters, digits, underscores) and a WORD (anything separated strictly by whitespace).

When editing code with dots, dashes, parentheses, and punctuation, uppercase `W`, `E`, and `B` leap over entire compound tokens in a single bound.

WORD motions

  • Wjump forward to the start of the next whitespace-delimited WORD
  • Ejump forward to the end of the current or next WORD
  • Bjump backward to the start of the previous WORD
1
import { getAuthToken } from "@/lib/auth/session-token";
2
const url = "https://api.vimactualhero.dev/v1/lessons?sort=asc";
3
const res = await client.request(url, { headers });

Compare `w` and `W` on the URL: `w` stops at every quote, slash, colon, question mark, and equals sign. `W` skips the entire URL in one leap.

Use `B` to jump back past entire path segments with minimal keystrokes.

Now it's your turn!

0 / 4 tasks complete0.0s / 13s par0 / 7 par

Practice this lesson's commands. Each task checks your technique and the result, not just your cursor position. Take your time.

Task 1: Jump back over the whole user.profile.name expression.

Show hint

Press B, not b.

1
user.profile.name next
jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next