Zet - How do I delete all lines in vim that don’t match a pattern?
How do I delete all lines in vim that don’t match a pattern?
You can use
:g!/price/d
to delete every line that doesn’t contain “price”
As answered below, g! is an alias to v. this is equivalent to
:v/price/d
#vim