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.

17/19
Free Trial: 5 lessons remaining
Unlock Full Access

Insert, Append, and New Lines

Estimated time: 10 minutes

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
Before
vim
First line Second line Third line
After
vim
First line New line above Second line Third line New line below

Helpful commands:

Command Description
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

Hints

  • 'o' creates new line below, 'O' creates new line above
  • 'a' appends after cursor, 'i' inserts at cursor
vim@sandbox: ~/workspace
Make sure to save your file with :w ⏎ before submitting!