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)
1
function temporaryHelper() {
2
console.log("temp");
3
return 123;
4
}
5
6
function 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!

  1. Navigate to each green target across the code snippet.
  2. Use the motions and techniques learned in this lesson to land accurately on each target.
  3. See how fast you can complete 10 targets.
0/10
1
function temporaryHelper() {
2
console.log("temp");
3
return 123;
4
}
5
6
function realFunction() {
7
return 456;
8
}
NORMAL
00:00