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.

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

Paragraph & Sentence Objects

Estimated time: 10 minutes

Task Instructions

Work with larger text units using paragraph and sentence objects

Use paragraph and sentence text objects for larger text manipulations. Use dap to delete entire paragraphs, cip to rewrite paragraph contents.

Learning objectives

  • Master paragraph objects: ip (inner paragraph) and ap (around paragraph)
  • Learn sentence objects: is and as
  • Practice moving and editing text blocks
  • Understand how Vim defines paragraphs and sentences

Required Keystrokes

This lesson requires you to use specific keystrokes to complete it. Your submission will be evaluated based on whether you used the required keystrokes mentioned below, rather than matching a specific output.

[cd]ap
Use paragraph objects
[cdv]i[ps]
Use text objects

What This Means

  • Your solution must include the required keystroke patterns
  • The order of keystrokes may matter depending on the exercise
  • You'll still need to achieve the expected output
  • This helps you practice specific Vim techniques

Helpful commands:

Command Description
dap Delete a paragraph
cip Change inner paragraph
vap Select around paragraph
dis Delete inner sentence
yas Yank around sentence

Hints

  • Paragraphs are separated by blank lines
  • ap includes the blank lines, ip doesn't
  • Great for moving functions or text blocks
vim@sandbox: ~/workspace
Make sure to save your file with :w ⏎ before submitting!