Mission 10 / 52• Essential Motions

Moving to Line Ends

Indentation is common in programming, meaning the start of a line often contains leading spaces or tabs.

Vim distinguishes between column 0 (the absolute beginning of the line) and the first non-blank character of code.

Line boundary motions

  • 0move to the very first column of the line (column 0)
  • _move to the first non-blank character (start of actual code)
  • $move to the last character of the line
1
const indentedStatement = parseCode(source);
2
return result.data.items[0];
3
}

Place cursor on the indented line and press `0`. You land on the left margin. Press `_` to jump right to the `c` in `const`. Press `$` to jump straight to the semicolon.

Now it's your turn!

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

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

Task 1: Move directly to the semicolon with $.

Show hint

Press $.

1
const result = ready;
jkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next