[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: VIM Question
Let's say that I am using VIM to edit a text file and I want to replace
mulitple occurrances of "fred" with "wilma." What's the easiest way to do
this?
Just as Doc had shown:
%s/fred/wilma/g will replace all occurrences of fred with wilma on each
line.
%s/ Means search every line
3,14s/ Means search only lines 3 through 14
.,50s/ Means search from the line the cursor is on to line 50.
%s/fred/wilma/ (Without g=global) means replace the first occurrence of
fred with wilma.
-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.