On 9/2/06, Ilya <[EMAIL PROTECTED]> wrote:
Hello.I have a question regarding syntax matching. I have some kind of syntax and I have some solution to highlight it, but it does not work the way I expect it to. What I want: match syntax that consists of blocks (enclosed in {}), strings (enclosed in "") and identifiers (starts with ${ and ends with }). Block end should also end any string that starts inside this block. My solution: :syn cluster Top contains=Block,String,Identifier :syn region Block start=+{+ end=+}+ keepend extend [EMAIL PROTECTED] :syn region String start=+"+ end=+"+ contains=Identifier :syn region Identifier start=+\${+ end=+}+ extend
Your 'keepend' option clearly causes '}' which is end of identifier to terminate the enclosing block, in full accordance with :help syn-keepend. If I read ':help syn-keepend' right, then 'keepend' does not allow a region on which it is used to have proper subregions. Yakov
