Tuesday, January 17, 2012

vim: Delete all lines matching a search pattern

A great little command that definitely saves you time!

:g/.*foo.*/d

the "d" at the end is replaceable so you can use other commands if needed.

Source

No comments:

Post a Comment

Leave your thoughts ...

---
If you are having trouble with copy/pasting in comments, you need to sign in or click 'Preview'.

For more information about this Firefox bug, see here.