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

Insert, Append, and New Lines

Basic Text Editing

Task Instructions

Learn different ways to enter Insert Mode and create new lines

Add 'New line above' between the first and second lines using 'O', and add 'New line below' after the third line using 'o'. You can also practice using 'a' to append text.

Learning objectives

  • Practice using 'a' to append text
  • Learn 'o' and 'O' for creating new lines
  • Understand different text insertion methods
lesson.txt

Start

 1First line
 2Second line
 3Third line

Goal

 1First line
 2New line above
 3Second line
 4Third line
 5New line below

Helpful commands

a
Enter Insert Mode after cursor (append)
o
Create new line below and enter Insert Mode
O
Create new line above and enter Insert Mode
Stuck? Peek at a hint 2 hints · try it on your own first
  • 'o' creates new line below, 'O' creates new line above
  • 'a' appends after cursor, 'i' inserts at cursor
vim@sandbox: ~/workspace
Save your file with :w ⏎ to unlock Submit