I have a file which has the following structure
From: [email protected] Subject: Bar Date: 2017-06-27 Mailbox: /some/dire/ctory <CR>
Such a block always contains of four lines followed by an empty line. I want to delete all blocks which contain
Subject: Bar. In the past I recorded keystrokes and replayed them. So I searched for the string (
/Subject: Bar), hit
dap and replayed it. This took quite a while for larger files. Thatswhy I'm looking for another approach.
How can I delete blocks of text in vim when they contain a search pattern?