How do I delete an entire paragraph?
Answer
dip
Explanation
The dip command deletes the inner paragraph — all contiguous non-blank lines surrounding the cursor. This is useful for removing blocks of code or text.
How it works
dis the delete operatoripis the "inner paragraph" text object- A paragraph is bounded by blank lines
- Does not delete the surrounding blank lines
Example
First paragraph.
Second paragraph
with multiple lines
in it.
Third paragraph.
With the cursor in the second paragraph, dip removes the three lines of that paragraph.
Tips
dapdeletes around the paragraph (including trailing blank line)vipselects the paragraph in visual modeyipyanks the paragraphcipchanges the paragraph- In code, paragraphs are blocks separated by blank lines