Re: escape() and '

2006-10-25 Thread Nikolai Weibull
On 10/25/06, Hari Krishna Dara [EMAIL PROTECTED] wrote: '\V'.escape(substitute(regex, ', '', 'g'), '\') Uh, when did Vim's strings become objects? (Would be really nice if they were, mind you.) nikolai

Re: escape() and '

2006-10-25 Thread Nikolai Weibull
On 10/25/06, Nikolai Weibull [EMAIL PROTECTED] wrote: On 10/25/06, Hari Krishna Dara [EMAIL PROTECTED] wrote: '\V'.escape(substitute(regex, ', '', 'g'), '\') Uh, when did Vim's strings become objects? (Would be really nice if they were, mind you.) Ahahaha, OK. Sorry. Goddam I hate the

Re: escape() and '

2006-10-24 Thread Mikolaj Machowski
Dnia poniedziałek, 23 października 2006 16:25, Nikolai Weibull napisał: On 10/23/06, Mikolaj Machowski [EMAIL PROTECTED] 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

Re: escape() and '

2006-10-24 Thread Nikolai Weibull
On 10/23/06, Mikolaj Machowski [EMAIL PROTECTED] wrote: Dnia poniedziałek, 23 października 2006 16:25, Nikolai Weibull napisał: I'll take your word for it that that means that I wrote something at some time or other. There should really be a third, optional, parameter to escape() where

Re: escape() and '

2006-10-24 Thread Mikolaj Machowski
Dnia wtorek, 24 października 2006 11:10, Nikolai Weibull napisał: Oh, I see. You're thinking of creating a string for passing to substitute() inside an :execute, or something like that. Ah, true, then you'd need to escape the single-quotes for the string, and, e.g., . with \.. Escaping is a

Re: escape() and '

2006-10-24 Thread Hari Krishna Dara
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

Re: escape() and '

2006-10-24 Thread Nikolai Weibull
On 10/25/06, Hari Krishna Dara [EMAIL PROTECTED] wrote: :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. It's

Re: escape() and '

2006-10-24 Thread Hari Krishna Dara
On Tue, 24 Oct 2006 at 11:10am, Nikolai Weibull wrote: There should really be a third, optional, parameter to escape() where you can specify what character to use for escaping. That wouldn't be real solution because to escape ' you still (in most situations) would need two escape()

Re: escape() and '

2006-10-23 Thread A.J.Mechelynck
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

Re: escape() and '

2006-10-23 Thread Nikolai Weibull
On 10/23/06, A.J.Mechelynck [EMAIL PROTECTED] wrote: 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

Re: escape() and '

2006-10-23 Thread Yakov Lerner
On 10/23/06, Nikolai Weibull [EMAIL PROTECTED] wrote: On 10/23/06, Mikolaj Machowski [EMAIL PROTECTED] 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