Need advice on pattern matching using match()

2007-04-04 Thread Michael Klier
Hi everybody, I have a little problem with pattern matching using Vims' match() function. I`ve wrote a syntax highlighting script for a certain Wiki Syntax, now I want to check via autocommand if the edited text file is a Wiki file: autocmd BufEnter *.txt call IsWikiSyntax() The function

Re: Need advice on pattern matching using match()

2007-04-04 Thread Tim Chase
if match(getline(1,20),^ \{0,1}\(=\{2,6}\)[^=]\+\1 *$) = 0 The pattern used in the match() call is the same as in the syntax highlighting script. My guess is that it's something like an escaping problem. You're using double-quotes which are a little more finicky about

Re: [SOLVED] Need advice on pattern matching using match()

2007-04-04 Thread Michael Klier
Tim Chase wrote: if match(getline(1,20),^ \{0,1}\(=\{2,6}\)[^=]\+\1 *$) = 0 The pattern used in the match() call is the same as in the syntax highlighting script. My guess is that it's something like an escaping problem. You're using double-quotes which are a little more finicky

Re: OT: Reply-To munging [was: [SOLVED] Need advice on pattern matching using match()]

2007-04-04 Thread Jean-Rene David
* Michael Klier [2007.04.04 17:30]: I am sure this has been questioned before but why is the Reply-To: header field not set via the mailing-list? Short answer: because it makes it more difficult to reply to the author without making it easier to reply to the list. Long answer:

Re: OT: Reply-To munging [was: [SOLVED] Need advice on pattern matching using match()]

2007-04-04 Thread Michael Klier
Jean-Rene David wrote: * Michael Klier [2007.04.04 17:30]: I am sure this has been questioned before but why is the Reply-To: header field not set via the mailing-list? Short answer: because it makes it more difficult to reply to the author without making it easier to reply to the list.