How to remove all lines containing a pattern using Vim

As shown in the Remove all blank lines using Vim post :g command is what we are looking for.

For example, to remove all lines containing the string “TO REMOVE” we have to issue the following command:

That`s all.

You may also like...

Leave a Reply

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