[CLUE-Tech] vi search/replace question

Keith Hellman khellman at mcprogramming.com
Fri Apr 23 13:55:24 MDT 2004


On Fri, Apr 23, 2004 at 08:48:44AM -0600, Mike wrote:
> 
> :g/^#/d
> 
> Explanation:
> colon(:), enter ex mode
> g, for global (entire file)
> /^#/, regular expression
> d, delete lines that match the RE

Hrmph.  I tried this at home this morning and it didn't work (debian
sid, vim).  It certainly works with the vim6.0 I have on my crusty red
hat box at work.  I'll have to go home and make sure I didn't mistype
something.

-- 
Keith Hellman                             #include <disclaimer.h>
khellman at mcprogramming.com                from disclaimer import standard
public key @ www.mcprogramming.com

The purpose of computing is insight, not numbers.

-- Richard W. Hamming, 1962
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://cluedenver.org/pipermail/clue-tech/attachments/20040423/3ca9b066/attachment.bin


More information about the clue-tech mailing list