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!
- Navigate to each green target across the code snippet.
- Use the motions and techniques learned in this lesson to land accurately on each target.
- See how fast you can complete 10 targets.
0/10
1 const indentedStatement = parseCode(source);2 return result.data.items[0];3}NORMAL
00:00
NextCtrl+jFind Character