Name

delete

Synopsis

[address] d [buffer]

Description

Delete the lines included in address. If buffer is specified, save or append the text to the named buffer.

Examples

:/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

Get Linux in a Nutshell, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.