2 " Language: Windows Scripting Host
3 " Maintainer: Paul Moore <pf_moore AT yahoo.co.uk>
4 " Last Change: Fre, 24 Nov 2000 21:54:09 +0100
6 " This reuses the XML, VB and JavaScript syntax files. While VB is not
7 " VBScript, it's close enough for us. No attempt is made to handle
9 " Send comments, suggestions and requests to the maintainer.
11 " Quit when a syntax file was already loaded
12 if exists("b:current_syntax")
16 let s:wsh_cpo_save = &cpo
19 runtime! syntax/xml.vim
20 unlet b:current_syntax
23 syn include @wshVBScript <sfile>:p:h/vb.vim
24 unlet b:current_syntax
25 syn include @wshJavaScript <sfile>:p:h/javascript.vim
26 unlet b:current_syntax
27 syn region wshVBScript
28 \ matchgroup=xmlTag start="<script[^>]*VBScript\(>\|[^>]*[^/>]>\)"
29 \ matchgroup=xmlEndTag end="</script>"
31 \ contains=@wshVBScript
33 syn region wshJavaScript
34 \ matchgroup=xmlTag start="<script[^>]*J\(ava\)\=Script\(>\|[^>]*[^/>]>\)"
35 \ matchgroup=xmlEndTag end="</script>"
37 \ contains=@wshJavaScript
40 syn cluster xmlRegionHook add=wshVBScript,wshJavaScript
42 let b:current_syntax = "wsh"
44 let &cpo = s:wsh_cpo_save