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.

10/19
Free Trial: 4 lessons remaining
Unlock Full Access

Jumping to Specific Line Numbers

Estimated time: 10 minutes

Task Instructions

Learn to navigate to specific line numbers using the :n command

Practice jumping to specific line numbers using :n where n is the line number. Try :25 to go to line 25, :42 for line 42, etc. The file has 50 lines with markers every 5-10 lines to help you verify your jumps.

Learning objectives

  • Master the :n command for line number navigation
  • Understand how to jump to specific lines instantly
  • Practice navigating large files efficiently
  • Combine line numbers with other navigation commands

Required Keystrokes

This lesson requires you to use specific keystrokes to complete it. Your submission will be evaluated based on whether you used the required keystrokes mentioned below, rather than matching a specific output.

:\d+
Use :n to jump to a specific line number

What This Means

  • Your solution must include the required keystroke patterns
  • The order of keystrokes may matter depending on the exercise
  • You'll still need to achieve the expected output
  • This helps you practice specific Vim techniques

Helpful commands:

Command Description
:n Go to line number n (e.g., :25)
:$ Go to the last line of the file
:1 Go to the first line of the file
:set number Show line numbers in the editor

Hints

  • Type :25 and press Enter to go to line 25
  • The colon (:) enters command mode
  • You can use :$ to go to the last line
  • :1 takes you to the first line

Ready for Vim?

Before starting this lesson, be prepared.

Read the directions on the left, and when you're ready, let's go!