How can you remove given lines efficiently in Vim?
I want to remove all lines which match this
:g!/div/
I unsuccessfully ran:
:g!/div/s/^*//g
To remove all lines that match div
:g/div/d
To remove all lines that don't match div
:g!/div/d
:g!/div/d
Works just fine to do what you want.