On 10/30/06, Marc Weber <[EMAIL PROTECTED]> wrote:
How can I tell vim to not tread & and ~ in a special way when using
substitute?

compare
        echo substitute(substitute('a','a','b','&'),'b','c &','')
and
        echo substitute(substitute('a','a','b','&'),'b',substitute('c 
&','\V\(&\|~\)','\\\1','g'),'')
using substitute works but seems to be more ugly when used in scripts?

You can make your function MySubstitute() that internally
does quoting that you're comfortable with.
Then your call to MySubstitute() will look nice.

Yakov

Reply via email to