Mission 42 / 52• Text Objects - Paragraphs
Delete Inside Paragraph
In Vim, a 'paragraph' (`p`) is any contiguous block of non-empty lines.
`dip` deletes the current block of text, leaving surrounding blank lines intact.
Delete inside paragraph
- dipdelete the entire paragraph/block (preserves blank lines)
1function temporaryHelper() {2 console.log("temp");3 return 123;4}5 6function realFunction() {7 return 456;8}Move anywhere inside `temporaryHelper()` and type `dip`. The entire function block is deleted at once.
Now it's your turn!
- Navigate to each green target across the code snippet.
- Use the motions and techniques learned in this lesson to land accurately on each target.
- See how fast you can complete 10 targets.
0/10
1function temporaryHelper() {2 console.log("temp");3 return 123;4}56function realFunction() {7 return 456;8}NORMAL
00:00
NextCtrl+jDelete Around Paragraph