How to remove the beginning of a pattern on another line?

I would like to know if it is possible to delete before the start of the template on another line.

pe

  • good morning |
  • empty line
  • empty line
  • empty line
  • ....
  • empty line
  • Hello World

Is it possible to remove "|" from the cursor on line 1 to "world on line 7? (remains in normal mode)

I often do this. I usually use "dd" to delete all lines between line 1 and line 7, and then delete the word "dfw", but it is difficult if I am on line 347 and my text is on 381. I have to count the lines between them, and often i delete one line too much.

+5
source share
2 answers

dd ( ) d (^ - )

^The quick
 brown fox
 jumped over
 the lazy
 dog

d/the . ,

 the lazy
 dog
+7

"":

d/world<Enter>
+3

All Articles