Screen Too Small

This course material requires a larger screen to properly display the terminal and editor interfaces.

Please use a tablet, laptop, or desktop computer for the best learning experience.

You can continue browsing, but the experience will be significantly limited.

Free Trial: 5 lessons remaining
Unlock Full Access
Practice Beginner 10 min

Moving to Beginning and End of Lines

Vim Basics & Movement

Task Instructions

Master line-based movement with 0 and $ commands

Use '0' to move to the beginning of a line and '$' to move to the end of a line. Practice moving between different lines.

Learning objectives

  • Master line-based movement with 0 and $
  • Understand beginning vs end of line navigation
  • Build efficient line navigation habits

Required keystrokes

Your submission is checked for these keystrokes, not just the final text — so reach for the technique, not a workaround.

  • 0 Move to beginning of line at least once
  • $ Move to end of line at least once

Helpful commands

0
Move to beginning of line
$
Move to end of line
^
Move to first non-blank character
Stuck? Peek at a hint 2 hints · try it on your own first
  • 0 = beginning of line, $ = end of line
  • You can use j and k to move between lines, then 0 or $ to go to the beginning or end
vim@sandbox: ~/workspace
Save your file with :w ⏎ to unlock Submit