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

Re: Syntax highlighting for Zope's DTML

Expand Messages
  • Bram Moolenaar
    ... Of course, the included syntax file must allow it to be included. There is no other way. ... I see. Thus the highlighting part of it is effectively the
    Message 1 of 6 , Nov 3, 2000
    • 0 Attachment
      Utz-Uwe Haus wrote:

      > > Vim can already do this, by including one syntax file in another. No need
      > > to decide between two syntax files, you can have them all at the same
      > > time!
      >
      > Yes, but that only works if the syntax files behave nicely in the sense
      > that their behaviour is not ordering-dependent. I have a few syntax
      > files here that make ordering assumptions...

      Of course, the included syntax file must allow it to be included. There is no
      other way.

      > > I would expect that multiple-major-modes suddenly changes the highlighting
      > > when the cursor moves to another area. Doesn't that look ugly?
      > No, syntax highlighting is block-wise: the highlighting rules are
      > applied only to the blocks the syntax is responsible for. Menus and
      > command mappings change on-the-fly though.

      I see. Thus the highlighting part of it is effectively the same as what Vim
      does.

      > > What we need is a wholistic HTML syntax file, that includes the other
      > > syntaxes. Perhaps with a few tricks to avoid the need to include them all.
      > Yes, but a generalized solution would be nice too...

      I don't see much to generalize. You need one syntax file to define how other
      languages are included. The start and end of the area where the other
      language appears must be found. And the synchronization needs to be taken
      care of. Then you must say which syntax appears in that area. That's what
      ":syn include" is for. I don't see which mechanisms are missing to support
      it.

      Of course it's work to make it all fit together. That's up to the people who
      write the syntax files.

      --
      hundred-and-one symptoms of being an internet addict:
      25. You believe nothing looks sexier than a man in boxer shorts illuminated
      only by a 17" inch svga monitor.

      /// Bram Moolenaar Bram@... http://www.moolenaar.net \\\
      \\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.