Vim Scoops / Lessons / Start and end of a line

How to go to the start or end of a line in Vim

Press 0 to jump to the start of the line and $ to jump to the end. ^ goes to the first character that isn't a space, which is usually what you want in indented code.

The keys

KeysWhat they do
0Very start of the line
^First non-blank character
$End of the line
I / AJump to the start / end and start typing

They match regular expressions, if that helps them stick: ^ is the start and $ is the end.

After $, moving up or down with j and k keeps you at the end of each line, however long it is.

Related

Want all of Vim, in order? Vim Scoops is a free game that starts at h j k l and builds up to macros.

Play the full game