On Mon, 23 Oct 2006 at 12:51pm, Mikolaj Machowski wrote: > Hello, > > I understand that escape() was primarily designed to escape strings when > passing to system functions, but personally I never used that and in > didn't noticed such use in various scripts but very often it is used to > escape various charaters in Vim's own regexp matching or passing one > string to some other Vim command. > > Hence is the problem: when escaping ' with escape(), character is > prepended with \ which doesn't make sense when passing it to other Vim > command because proper way to escape it in Vim is doubling it with > another '. Example:: > > :echo escape('as''df', '''')
I didn't even know that you can escape a single-quote inside single-quotes like this, where is this information burried in Vim help? It seems to work though, so just checking if it is documented. -- Thanks, Hari __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com