Course
Practice
Beginner
10 min
Paragraph & Sentence Objects
Text Objects: Speaking Vim's Language
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
Your submission is checked for these keystrokes, not just the final text — so reach for the technique, not a workaround.
- [cd]ap Use paragraph objects
- [cdv]i[ps] Use text objects
Helpful commands
- dap
- Delete a paragraph
- cip
- Change inner paragraph
- vap
- Select around paragraph
- dis
- Delete inner sentence
- yas
- Yank around sentence
Stuck? Peek at a hint 3 hints · try it on your own first
- Paragraphs are separated by blank lines
- ap includes the blank lines, ip doesn't
- Great for moving functions or text blocks
Premium Course
This is a premium course available exclusively to paid members.
Upgrade your membership to access this course and all premium content on the platform.
Upgrade to Premium
Access all premium courses
Unlimited lesson submissions
Track your progress
" Read the task on the left.
" A live Vim editor opens right here.
" Finish the edits, then submit.
~
~
NORMAL