24387
|
1 " Vim syntax file
|
|
2 " Language: Windows PowerShell
|
|
3 " URL: https://github.com/PProvost/vim-ps1
|
|
4 " Last Change: 2013 Jun 24
|
|
5
|
|
6 if exists("b:current_syntax")
|
|
7 finish
|
|
8 endif
|
|
9
|
|
10 let s:ps1xml_cpo_save = &cpo
|
|
11 set cpo&vim
|
|
12
|
|
13 doau syntax xml
|
|
14 unlet b:current_syntax
|
|
15
|
|
16 syn case ignore
|
|
17 syn include @ps1xmlScriptBlock <sfile>:p:h/ps1.vim
|
|
18 unlet b:current_syntax
|
|
19
|
|
20 syn region ps1xmlScriptBlock
|
|
21 \ matchgroup=xmlTag start="<Script>"
|
|
22 \ matchgroup=xmlEndTag end="</Script>"
|
|
23 \ fold
|
|
24 \ contains=@ps1xmlScriptBlock
|
|
25 \ keepend
|
|
26 syn region ps1xmlScriptBlock
|
|
27 \ matchgroup=xmlTag start="<ScriptBlock>"
|
|
28 \ matchgroup=xmlEndTag end="</ScriptBlock>"
|
|
29 \ fold
|
|
30 \ contains=@ps1xmlScriptBlock
|
|
31 \ keepend
|
|
32 syn region ps1xmlScriptBlock
|
|
33 \ matchgroup=xmlTag start="<GetScriptBlock>"
|
|
34 \ matchgroup=xmlEndTag end="</GetScriptBlock>"
|
|
35 \ fold
|
|
36 \ contains=@ps1xmlScriptBlock
|
|
37 \ keepend
|
|
38 syn region ps1xmlScriptBlock
|
|
39 \ matchgroup=xmlTag start="<SetScriptBlock>"
|
|
40 \ matchgroup=xmlEndTag end="</SetScriptBlock>"
|
|
41 \ fold
|
|
42 \ contains=@ps1xmlScriptBlock
|
|
43 \ keepend
|
|
44
|
|
45 syn cluster xmlRegionHook add=ps1xmlScriptBlock
|
|
46
|
|
47 let b:current_syntax = "ps1xml"
|
|
48
|
|
49 let &cpo = s:ps1xml_cpo_save
|
|
50 unlet s:ps1xml_cpo_save
|
|
51
|