Loading ...
Sorry, an error occurred while loading the content.

some feature requests for highighting

Expand Messages
  • Tomas Ebenlendr
    Yes highlighting is quite powerfull yet, but... I wrote some highliht of operators (incliding ? : ) for C, and I had to do it all in 2 versions, c and cpp,
    Message 1 of 1 , Jan 31, 2003
    • 0 Attachment
      Yes highlighting is quite powerfull yet, but...

      I wrote some highliht of operators (incliding ? : ) for C, and I had to
      do it all in 2 versions, c and cpp, because the two versions vere
      differnt in what they contained. I thing, such things will be done much
      easier if one can specify what elements can (cannot) be contained in any
      depth.
      example:
      syn region Region1 start="(" end=")" depthcontains=Region3,Region1
      syn region Region2 start="{" end="}" depthcontains=Region3,Region2
      syn region Region3 start="[" end="]" contained contains=ALL

      text ({[({})]}) {([{[()]}])}
      will be colored: 1131111311 223233332322
      and I didn't need to specify 2 versions of Region3 (one wich contains
      only Region1 and one wich contains only Region2). (It can be internaly
      implemented by 2 such regions.)
      (I had much things that were Region3 like ...)

      And second request, that will help e.g. with writing highlinting for
      lisp, but not only for it...
      there might be special higlight that depends on depth of containment.
      eg.:
      hi SomeThing depth=1 ctermfg=red
      hi SomeThing depth=2 ctermfg=green
      then, when SomeThing will be contained by even number of ancestors (any
      type), it will be green. And red otherwise.
      --
      Tomas 'ebi' Ebenlendr
      http://get.to/ebik
      PF 2003.08418515348
    Your message has been successfully submitted and would be delivered to recipients shortly.