vim: Delete all lines matching a search pattern

0 comments

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

0 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.

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog