I'm comfortable doing search/replace in vim, but how do I delete all lines in a file (or between certain lines) if they match a condition? Currently I shell out and run a sed command, for example:
sed -i '/^CRITICAL/d' hosts
(delete all the lines that start with CRITICAL from the hosts file).
How would I do this in vim?