sponsor Vim development Vim logo Vim Book Ad

basic Tip #213: delet all lines containt TXT

 tip karma   Rating 30/33, Viewed by 1211 

created:   February 10, 2002 10:43      complexity:   basic
author:   tarjei      as of Vim:   5.7

I needed this one when I was editing an ldif file:

I needed to delete all lines containing "profile":

:g/profile/d

very handydandy

 rate this tip  Life Changing Helpful Unfulfilling 

<<Setting file attributes without reloading a buffer | Current buffer based menus >>

Additional Notes

[email protected], February 18, 2002 22:53
Can I get this tips in my INBOX??

Regards,
Seenu.
[email protected], August 17, 2003 22:36
use g/^$/d to delete all the blank lines in your file.

(I think there is an easier/faster way to do this, but I forget how)
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to [email protected] after searching the archive. Help Bram help Uganda.
Sponsored by Web Concept Group Inc. SourceForge Logo