On Thu, Jul 15, 2004 at 12:06:07PM -0400, David Turetsky wrote: > > David Turetsky wrote: > > >>:%s/^[a-z]:[0-9]/#/g > > > Try something like: > > > %g!/^#/s/^/#/ > > > Steve Lamb replied: > > > Personally I'd do it this way: > > %s/\(.*\)/#\1/g > > David responded: > > Steve's approach would put a # in the front of ALL > lines whether or not they initially contain an existing > # to begin with > > If that is what you wanted to do, you could: > > %s/^/#/
Then follow that with %s/^##/#/ to end up with the desired result, I think... Ken -- Ken Irving, Research Analyst, [EMAIL PROTECTED], 907-474-6152 Water and Environmental Research Center Institute of Northern Engineering University of Alaska, Fairbanks -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]