Select when a shape needs inspection

0 of 2

The technique

Your textVim mode: Normal
Replace the old sentence with the one you copied. Before: Ships in 2 days. / Arrives soon. Thanks!. After: Ships in 2 days. / Ships in 2 days. Thanks!.

v starts the selection and f. stretches it to the full stop. p puts your copy in its place.

Keys in this lesson

v
Select characters. Move to grow the selection.
V
Select whole lines.

Before this lesson: Operators and movement.

More about this lesson

Select text with v or V, adjust the selection, then choose what to do with it.

v selects characters and V selects whole lines. Move to grow or shrink the selection, then press d to delete it, y to copy it or c to change it. p puts what you copied in place of the selection, so you don't have to delete the old text first and keep your copy safe. Esc cancels, and gv selects the same text again. When you know the boundary, a text object is often clearer.

Example

Copy the new sentence with yf., then go to the old one. v then f. selects it up to its full stop, and p puts the copy in its place. V then j selects two whole lines in the same way.

Use Start over to try again.

Guides on this topic

Exercise 1 of 2

0keys

par 14

Make the empty wishlist end the way the empty cart does. Replace Come back later! with Browse the new arrivals to get started.

Your textVim mode: Normal

Make it look like this

// English strings for the storefront. Keys are grouped by page.
export const strings = {
  "cart.title": "Your cart",
  "cart.empty": "Your cart is empty. Browse the new arrivals to get started.",
  "cart.checkout": "Go to checkout",
  "wishlist.title": "Saved for later",
  "wishlist.empty": "Nothing saved yet. Browse the new arrivals to get started.",
  "wishlist.move": "Move to cart",
  "orders.title": "Your orders",
  "orders.empty": "You haven't ordered anything yet.",
};

Yours

Par

Keyboard shortcuts
Ctrl+Enter
Check the result
Ctrl+Alt+U
Undo the last change
Ctrl+Alt+H
Show the next hint
Ctrl+Alt+R
Start the exercise over
Ctrl+Alt+P
Previous exercise
Ctrl+Alt+N
Next exercise
Ctrl+Alt+K⌃⌥K
Show the keyboard shortcuts
Ctrl+Alt+F⌃⌥F
Turn focus mode on or off
Ctrl+Alt+S⌃⌥S
Open the editor settings
Enter
Go on to the next step after you finish

The Ctrl+Alt shortcuts don't clash with Vim's own keys. On a Mac, use Control and Option.