vim replace and remove line

remove lines starting with string

:g/^1.2.3.4.*$//d

remove all empty lines

:g/^$/d
:g/profile/d

delete line that contains “profile”

Leave a Reply

Your email address will not be published. Required fields are marked *