Back to Lessons
Sign inintermediate

Copy/Paste Lines

Copy and paste lines with yy and p

Open companion guide

Goals

0/3
  • Yank line with yy
  • Paste after with p
  • Paste before with P
Keys 0 · par 15

Instructions

  1. 1.Yank the first line with yy
  2. 2.Move to the last line with G
  3. 3.Paste with p to duplicate it
Quick KeysNORMAL
h j k lMove cursor
w b eWord movement
i a oEnter insert
dDelete
yYank (copy)
pPaste
uUndo
vVisual mode
:Command mode
/Search

Community pulse

Weekly top score
Leaderboard warming up...
Daily challenge
Loading challenge...
Vim mode: normal

Practice buffer · reset restarts the lesson (not vim u)

Lesson Companion

Use Copy/Paste Lines in real editing

This companion guide helps you complete Copy/Paste Lines with fewer mistakes and better command fluency.

Quick Command Cheatsheet
  • yank
  • paste
When to Use This Motion/Operator

Use this lesson whenever you need to apply precise changes instead of entering long Insert-mode edits with fewer keystrokes.

  • Prefer this over arrow-key micro-movements before each edit.
  • Use this pattern whenever you're working inside Editing & Operators tasks.
  • Reach for yank, paste when this pattern appears.
Common Mistakes
  • Staying in Insert mode after making a change instead of returning to Normal mode.
  • Chaining several keystrokes for an edit a single operator+motion combo would do.
FAQ

How long should this lesson take?

Target completion is 45 seconds, but correctness matters more than speed at first.

Should I move to the next lesson if my score is low?

Revisit the specific commands you missed rather than replaying the whole lesson — targeted practice closes gaps faster at this level.