On Tue, Oct 01, 2002 at 11:27:17AM +1000, Simon Wong wrote: > vi gurus, > > I've done some googling but couldn't find something to tell me how... > > I want to comment out every line in a file (inetd.conf) but not the ones > that already are. > > I tried > > :1,$s/^/# > > which does every line. Looks very uncool.
:%s/^[^#]/#/ -Andrew. -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
