[vox-tech] serendipity with vim

Issac Trotts vox-tech@lists.lugod.org
Fri, 2 Apr 2004 15:23:52 -0800


:%!grep -v 'your pattern here'

On Fri, Apr 02, 2004 at 07:44:43AM -0800, Ken Bloom wrote:
> In sed, one can delete every line matching a pattern with the command
> "/pattern/d". In vi, using the analagous command ":/pattern/d" only deletes 
> the first line that matches the pattern. How do you delete all the lines  
> that match the pattern? ":g/pattern/d"   (:g[lobal] lets you apply an ex  
> command to every line matching a pattern)

-- 
Issac Trotts
http://mallorn.ucdavis.edu/~ijtrotts
(w) 530-757-8789