Re: Syntax question regarding \%[

2006-09-06 Thread Peter Hodge
Hello, --- "A.J.Mechelynck" <[EMAIL PROTECTED]> wrote: > > So, it matches a part-word. Try adding an end-of-word pattern atom \> > before the ending slash (but after the ending bracket) on each line. You > wouldn't want "session.cookie_nomatch" to be matched as far as > "session.cookie_" woul

Re: Syntax question regarding \%[

2006-09-06 Thread A.J.Mechelynck
Peter Hodge wrote: Hello everyone, Thank you for your help ... syn keyword Error inte[ger] inte[rval] Unfortunately I need to use matches because the 'words' contain the '.' character, and I also need to be able to use a look-behind assertion. The thing is, I wanted to be able to write ea

Re: Syntax question regarding \%[

2006-09-06 Thread Peter Hodge
Hello everyone, Thank you for your help ... > > syn keyword Error inte[ger] inte[rval] > Unfortunately I need to use matches because the 'words' contain the '.' character, and I also need to be able to use a look-behind assertion. The thing is, I wanted to be able to write each match so that

Re: [BUG?] Syntax question regarding \%[

2006-09-06 Thread Bram Moolenaar
Tim Chase wrote: > >> If this is not the case, the help for \%[] may likely intend to > >> refer to "ordinary atoms" rather than "atoms". > >> > >> *However*, the above search/match expression returns an "E369: > >> invalid item in \%[]" error. > >> > >> I get this both in vim6.3 and vim7. > > >

Re: [BUG?] Syntax question regarding \%[

2006-09-06 Thread Tim Chase
If this is not the case, the help for \%[] may likely intend to refer to "ordinary atoms" rather than "atoms". *However*, the above search/match expression returns an "E369: invalid item in \%[]" error. I get this both in vim6.3 and vim7. The documentation omits to mention that \(\) things are

Re: [BUG?] Syntax question regarding \%[

2006-09-06 Thread Bram Moolenaar
Tim Chase wrote: > I suspect, in testing ideas on this, I may have turned up a bug > in either the implementation of \%[] or its documentation needs a > remedy. > > In theory, the following should work: > > :match Error /int\%[\(eger\|erval\)]/ > > I base that assumption on a combination

Re: [BUG?] Syntax question regarding \%[

2006-09-06 Thread Tim Chase
inte integ intege integer inter interv interva interval is there any easy way to make these two commands work? syntax match Error /int\%[eger]/ syntax match Error /int\%[erval]/ The second match begins taking priority as soon as the word is 'inte', and prevents 'integer' fro

Re: Syntax question regarding \%[

2006-09-06 Thread Charles E Campbell Jr
Yakov Lerner wrote: > > Even better would be use syn keyword: > >syn keyword Error int inte integ intege integer inter interv > interva interval > > On the other hand, both of your 'syn match'es use same group, so > why 2nd match taking over would be a problem anyway ? Probably syn keyword

Re: Syntax question regarding \%[

2006-09-05 Thread A.J.Mechelynck
Peter Hodge wrote: Hello all, Given the following text: inte integ intege integer inter interv interva interval is there any easy way to make these two commands work? syntax match Error /int\%[eger]/ syntax match Error /int\%[erval]/ The second match begins taking priorit

Re: Syntax question regarding \%[

2006-09-05 Thread Benji Fisher
On Tue, Sep 05, 2006 at 06:51:57PM +1000, Peter Hodge wrote: > Hello all, > > Given the following text: > > inte > integ > intege > integer > inter > interv > interva > interval > > is there any easy way to make these two commands work? > > syntax match Error /int\%[eger]/ >

Re: Syntax question regarding \%[

2006-09-05 Thread Yakov Lerner
On 9/5/06, Peter Hodge <[EMAIL PROTECTED]> wrote: Hello all, Given the following text: inte integ intege integer inter interv interva interval is there any easy way to make these two commands work? syntax match Error /int\%[eger]/ syntax match Error /int\%[erval]/ The sec

Syntax question regarding \%[

2006-09-05 Thread Peter Hodge
Hello all, Given the following text: inte integ intege integer inter interv interva interval is there any easy way to make these two commands work? syntax match Error /int\%[eger]/ syntax match Error /int\%[erval]/ The second match begins taking priority as soon as the word