On Tue, Feb 08, 2000 at 01:39:03PM +1100, Ken Yap wrote:
| >I want to replace all occurences of susank with susanr in my aliases file,
| >but the following syntax fails to find any matches:
| >:s/susank/susanr/g
| It works on the current line.
| Try
| g/susank/s//susanr/g
Or:
:%s/susank/susanr/g
The differences:
Ken's one says
for every line "g" containing susank "/susank/"
replace that "s//" with susanr "susanr/"
for all the occurences on the line "g"
Mine says:
for every line "%" (which is shorthand for "1,$", which is from
line 1 to the last line "$") substitute susanr for susank
"s/susank/susanr/" for all the occurences on the line "g"
Much the same functionally, utilising different syntax.
--
Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/
Sinners can repent, but stupid is forever.
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text