annotate runtime/syntax/wsh.vim @ 8800:f57949e1e9f1 v7.4.1688

commit https://github.com/vim/vim/commit/67c2c058ea34628bd575aac7ddba4cd3b244ed57 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 30 22:03:02 2016 +0200 patch 7.4.1688 Problem: MzScheme does not support partial. Solution: Add minimal partial support. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Wed, 30 Mar 2016 22:15:10 +0200
parents a81bc802c17c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Windows Scripting Host
19
a81bc802c17c updated for version 7.0011
vimboss
parents: 7
diff changeset
3 " Maintainer: Paul Moore <pf_moore AT yahoo.co.uk>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: Fre, 24 Nov 2000 21:54:09 +0100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " This reuses the XML, VB and JavaScript syntax files. While VB is not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " VBScript, it's close enough for us. No attempt is made to handle
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " other languages.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Send comments, suggestions and requests to the maintainer.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 let s:wsh_cpo_save = &cpo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 set cpo&vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 runtime! syntax/xml.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn include @wshVBScript <sfile>:p:h/vb.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn include @wshJavaScript <sfile>:p:h/javascript.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn region wshVBScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 \ matchgroup=xmlTag start="<script[^>]*VBScript\(>\|[^>]*[^/>]>\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 \ matchgroup=xmlEndTag end="</script>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 \ fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 \ contains=@wshVBScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 \ keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn region wshJavaScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 \ matchgroup=xmlTag start="<script[^>]*J\(ava\)\=Script\(>\|[^>]*[^/>]>\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 \ matchgroup=xmlEndTag end="</script>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 \ fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 \ contains=@wshJavaScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 \ keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn cluster xmlRegionHook add=wshVBScript,wshJavaScript
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 let b:current_syntax = "wsh"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 let &cpo = s:wsh_cpo_save
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 unlet s:wsh_cpo_save