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

15746RE: WSH (Windows Scripting Host) syntax file

Expand Messages
  • Moore, Paul
    Oct 17, 2000
      From: Johannes Zellner [mailto:johannes@...]
      > > easy it was to reuse the existing syntax files for this.
      > > The only thing I would say is that it might be nice if
      > > the XML syntax file had a few extra "hooks" somehow,
      > > so that when it is used like this, it could be tailored
      > tell me what sort of hooks you need and I'll include them!

      The problem was, that I couldn't really decide what hooks *were* needed -
      nor could I be sure that what I was thinking of was even possible with Vim's
      syntax features as they stand.

      Basically, what I was thinking about was that WSH files have script blocks
      in <script language="xxx"> sections. It's also possible to have no-content
      <script language="xxx" src="yyy"/> tags, which don't include code. I was
      thinking that I'd like to be able to say before loading the XML syntax file
      "I want the content of SCRIPT tags marked as being in group XXX. And
      furthermore, I'd like the group name to be dependent on the value of the
      LANGUAGE attribute. Oh, yes, and I want group XXX-LLL to contain the
      following items."

      OK, reading that, it's not going to be possible.

      The thing that nagged me is that in my syntax file, I've effectively
      reimplemented the parsing for <script> tags. And I've not done a complete
      job (I've ignored CDATA sections in script tags, for example). It seems to
      me that it should be possible to use the work already done in the xml file.

      Annoyingly, XML is precisely a markup format where the contents of tags *is*
      important. So I expect this type of requirement to come up more and more
      often. Maybe we need to work out precisely what additions are needed to
      Vim's syntax features to make this work. A bit like \z was added to cater
      for matching delimiters.

      Maybe, like folding and indenting, there's a need for expression-based

      This isn't an urgent issue, as I now have the WSH syntax file working. But
      it's something to keep in mind, before too many people reinvent the same

    • Show all 7 messages in this topic