VIm Question ...

Ben Duncan linux4ms at aim.com
Wed Oct 17 07:57:01 PDT 2007


I need to know the command to delete lines that DO NOT contain a string.

For example, I have lines that contain the strings in them "works_1", "works_2",
"works_3" and so on.

I want to hight light the rows and then delete the rows that DO NOT have
the string "works_4" in them.

The VIM manual states to use ":v/^dd/d" to do this, but it JUST does
not work. Or maybe I am too old to understand what the ^$%#% it is saying.

Anyway, Thanks.

-- 
Ben Duncan - Business Network Solutions, Inc. 336 Elton Road  Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
        - Hanlon's Razor



More information about the Linux-users mailing list