[address
] d
[buffer
]
Delete the lines included in address
.
If buffer
is specified, save or append the text to the named buffer.
:/Part I/,/Part II/-1d Delete to line above "Part II"
:/main/+d Delete line below "main"
:.,$/d Delete from this line to last line