I create a test file and was able to replace all % with % | by doing this:

:%s/%/% |/g

You shouldn't need to escape the %

Muhammad Farooq-i-Azam wrote:
I have to replace every occurrence of % in a file with
% |. I have been effectively replacing text using the
following construct:

:%s/\<text\>/replacement/g

However when I try to do the following:

:%s/\<%\>/% |/g
I am greeted by an error message. Obviously, the %
character needs to be treated differently for being
replaced. Escap sequence? I cannot figure out how to
do it. May be trivial for the gurus here. I will be thankful for a hint.

Many thanks in advance.

--
Muhammad Farooq-i-Azam
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

--
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim

Reply via email to