Checkpoint: move and edit in real files
The technique
The UK was the last line, so after dd the cursor is on the line above it. W jumps to the price and r5 replaces its first digit.
Keys in this lesson
- cw
- Change to the end of the word.
- dd
- Delete the line.
- r
- Replace one character with the next one you type.
- o
- New line below.
- O
- New line above.
- yy
- Copy the line.
- p
- Put after the cursor, or below the line.
Before this lesson: The other lessons of Editing foundations.
More about this lesson
Make three or four changes in each of three real files, with the moves and edits of this module.
You choose the commands. Move a line or two at a time, or jump with a line number and G. Then pick the edit that fits: x or r for one character, cw for a word, dd or cc for a whole line, o or O for a new one, and yy with p for a copy. Try without hints first, and open help if you need it.
Compare your whole result with the target before you finish.
Guides on this topic
Exercise 1 of 3
0keys
par 23We've stopped shipping to the UK, so delete its rate. Free shipping starts at 6000 now, Belgium costs 595, and the carrier is carriers.dhl. You can use any commands.