vglobal: Execute commands on lines that do not match globally
Other topics:v/pattern/d
Example:
> cat example.txt
TODO: complete this
NOT this
NOT that
TODO: Complete that
Open the example.txt using vim and type :v/TODO/d in the Ex mode. This will delete all lines that do not contain the TODO pattern.

Contributors

Topic Id: 9867
Example Ids: 30358
This site is not affiliated with any of the contributors.