Course
Free Trial: 3 lessons remaining
Unlock Full Access
Practice
Beginner
10 min
Jumping to File Positions
Navigation & Jumping
Task Instructions
Master file position jumping with gg and G commands
Use 'gg' to jump to the beginning of the file and 'G' to jump to the end of the file. Practice jumping between these positions.
Learning objectives
- Master gg and G commands for file navigation
- Understand file position jumping
- Practice efficient file traversal
lesson.txt
Start
Jump to the beginning of this file and then to the end. Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 Line 10 This is the last line.
Goal
Jump to the beginning of this file and then to the end. Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 Line 10 This is the last line.
Helpful commands
- gg
- Go to beginning of file
- G
- Go to end of file
- :n
- Go to line n
Stuck? Peek at a hint 2 hints · try it on your own first
- gg = go to beginning, G = go to end
- You can also use :1 for first line and :$ for last line
" Read the task on the left.
" A live Vim editor opens right here.
" Finish the edits, then submit.
~
~
NORMAL