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.

Related Posts

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.