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

15503RE: WSH (Windows Scripting Host) syntax file

Expand Messages
  • Paul Moore
    Oct 2, 2000
    • 0 Attachment
      From: Bram@... [mailto:Bram@...]
      > Looks OK, I'll include it (with a few modifications, see below).

      The mods basically just use the <sfile>-relative filenames, which is what I
      would do anyway once the file is being included in the distribution. It's
      only while it's a "personal" file that the <sfile> trick doesn't work.

      > > 1. I use "runtime syntax/xml.vim" to load the base XML
      > > highlighting. Only one problem, I'd like this to *fail*
      > Ehm, fail in what way? Normally it would then produce an error
      > message, and your script still continues (with more errors).

      That's what I read from the docs about :runtime. "Read Ex commands from
      {file} in each directory given by 'runtimepath'. There is no error for
      non-existing files." So, specifically, :runtime differs from :source in that
      no error is produced.

      > You could test if b:current_syntax has been set to "xml". If it isn't,
      > something went wrong.

      Yes, that would be reasonable in this case.

      > Hmm, ":syn include" is like searching for a syntax file to
      > include. We could search 'runtimepath' for the file. But
      > previously it included the full path, which conflicts with
      > using just the file name.
      > I suppose adding a new :syntax sub-command will be the simplest solution.
      > ":syn includepath"? Or an extra argument: ":syn include path"?

      Wouldn't it be OK if :syn include loaded the exact path if it was an
      absolute pathname, but otherwise searched 'runtimepath'? That would preserve
      backward compatibility (everything will use absolute paths at the moment)
      while allowing the use of 'runtimepath'.

      If that's not OK, then I'd prefer :syn include path (or maybe :syn include
      runtime, but that's a bit long).

      > This is the file as I would include it for Vim 5.7:

      Looks great to me. Thanks.

    • Show all 7 messages in this topic