diff --git a/pack/acp/start/vim-ps1/.gitignore b/pack/acp/start/vim-ps1/.gitignore deleted file mode 100644 index 0a56e3f..0000000 --- a/pack/acp/start/vim-ps1/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/doc/tags diff --git a/pack/acp/start/vim-ps1/README.markdown b/pack/acp/start/vim-ps1/README.markdown index bd641df..0684352 100644 --- a/pack/acp/start/vim-ps1/README.markdown +++ b/pack/acp/start/vim-ps1/README.markdown @@ -9,9 +9,8 @@ files, and also includes a filetype plugin so Vim can autodetect your PS1 script Includes contributions by: -* Tomas Restrepo -* Jared Parsons -* Heath Stewart +* Jared Parsons +* Heath Stewart * Michael B. Smith * Alexander Kostikov @@ -20,34 +19,17 @@ Installation Copy the included directories into your .vim or vimfiles directory. -Or even better, use [pathogen.vim][1] and simply pull it in like this: +Or even better, use pathogen and simply pull it in like this: cd ~/.vim/bundle git clone https://github.com/PProvost/vim-ps1.git -Folding -------- - -The ps1 syntax file provides syntax folding for script blocks and digital -signatures in scripts. - -When 'foldmethod' is set to "syntax" then function script blocks will be -folded unless you use the following in your .vimrc or before opening a script: - - :let g:ps1_nofold_blocks = 1 - -Digital signatures in scripts will also be folded unless you use: - - :let g:ps1_nofold_sig = 1 - -Note: syntax folding might slow down syntax highlighting significantly, -especially for large files. Comments and Suggestions ------------------------ -Please follow, fork or submit issues on [GitHub][2] and if you -find it useful, please vote for it on [vim.org][3]. +Please follow, fork or submit issues on [GitHub](https://github.com/PProvost/vim-ps1) and if you +find it useful, please vote for it on [vim.org](http://www.vim.org/scripts/script.php?script_id=1327). License ------- @@ -69,7 +51,6 @@ License Version History --------------- -* v2.10 (2013-06-24) Added Heath Stewart's here strings fix * v2.9 (2012-03-08) Included tomasr's changes * v2.81 (2012-03-05) Fixed a dumb typo * v2.8 (2012-03-05) Better number scanning, multiline comments, missing keywords and constants @@ -84,7 +65,3 @@ Version History * v1.3 (2005-12-20) Updates to syntax elements * v1.2 (2005-08-13) Fix foreach and while problem * v1.1 (2005-08-12) Initial release - -[1]: https://github.com/tpope/vim-pathogen -[2]: https://github.com/PProvost/vim-ps1 -[3]: http://www.vim.org/scripts/script.php?script_id=1327 diff --git a/pack/acp/start/vim-ps1/doc/ps1.txt b/pack/acp/start/vim-ps1/doc/ps1.txt index e865d98..49d0aac 100644 --- a/pack/acp/start/vim-ps1/doc/ps1.txt +++ b/pack/acp/start/vim-ps1/doc/ps1.txt @@ -1,38 +1,16 @@ *ps1.txt* A Windows PowerShell syntax plugin for Vim -Maintainer: Peter Provost -License: Apache 2.0 -Version: 2.10 +Author: Peter Provost +License: Apache 2.0 +Version: 2.9 -INTRODUCTION *ps1-syntax* +INTRODUCTION *ps1-syntax* This plugin provides Vim syntax, indent and filetype detection for Windows -PowerShell scripts, modules, and XML configuration files. +PowerShell. - -ABOUT *ps1-about* +ABOUT *ps1-about* Grab the latest version or report a bug on GitHub: http://github.com/PProvost/vim-ps1 - - -FOLDING *ps1-folding* - -The ps1 syntax file provides syntax folding (see |:syn-fold|) for script blocks -and digital signatures in scripts. - -When 'foldmethod' is set to "syntax" then function script blocks will be -folded unless you use the following in your .vimrc or before opening a script: > - - :let g:ps1_nofold_blocks = 1 -< -Digital signatures in scripts will also be folded unless you use: > - - :let g:ps1_nofold_sig = 1 -< -Note: syntax folding might slow down syntax highlighting significantly, -especially for large files. - ------------------------------------------------------------------------------- - vim:ft=help: diff --git a/pack/acp/start/vim-ps1/ftdetect/ps1.vim b/pack/acp/start/vim-ps1/ftdetect/ps1.vim index efb7652..4fc2f3d 100644 --- a/pack/acp/start/vim-ps1/ftdetect/ps1.vim +++ b/pack/acp/start/vim-ps1/ftdetect/ps1.vim @@ -1,11 +1,9 @@ " Vim ftdetect plugin file -" Language: Windows PowerShell -" Maintainer: Peter Provost -" Version: 2.10 +" Language: Windows PowerShell +" Maintainer: Peter Provost +" Version: 2.9 " Project Repository: https://github.com/PProvost/vim-ps1 -" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327 -" -au BufNewFile,BufRead *.ps1 set ft=ps1 -au BufNewFile,BufRead *.psd1 set ft=ps1 -au BufNewFile,BufRead *.psm1 set ft=ps1 -au BufNewFile,BufRead *.pssc set ft=ps1 +" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327 + +au BufNewFile,BufRead *.ps1 set ft=ps1 +au BufNewFile,BufRead *.psm1 set ft=ps1 diff --git a/pack/acp/start/vim-ps1/ftdetect/ps1xml.vim b/pack/acp/start/vim-ps1/ftdetect/ps1xml.vim deleted file mode 100644 index 4f4bfe9..0000000 --- a/pack/acp/start/vim-ps1/ftdetect/ps1xml.vim +++ /dev/null @@ -1,8 +0,0 @@ -" Vim ftdetect plugin file -" Language: Windows PowerShell -" Maintainer: Peter Provost -" Version: 2.10 -" Project Repository: https://github.com/PProvost/vim-ps1 -" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327 - -au BufNewFile,BufRead *.ps1xml set ft=ps1xml diff --git a/pack/acp/start/vim-ps1/ftdetect/xml.vim b/pack/acp/start/vim-ps1/ftdetect/xml.vim deleted file mode 100644 index 2257d48..0000000 --- a/pack/acp/start/vim-ps1/ftdetect/xml.vim +++ /dev/null @@ -1,9 +0,0 @@ -" Vim ftdetect plugin file -" Language: Windows PowerShell -" Maintainer: Peter Provost -" Version: 2.10 -" Project Repository: https://github.com/PProvost/vim-ps1 -" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327 - -au BufNewFile,BufRead *.cdxml set ft=xml -au BufNewFile,BufRead *.psc1 set ft=xml diff --git a/pack/acp/start/vim-ps1/ftplugin/ps1.vim b/pack/acp/start/vim-ps1/ftplugin/ps1.vim index 58096a4..e902abd 100644 --- a/pack/acp/start/vim-ps1/ftplugin/ps1.vim +++ b/pack/acp/start/vim-ps1/ftplugin/ps1.vim @@ -1,9 +1,9 @@ " Vim filetype plugin file -" Language: Windows PowerShell -" Maintainer: Peter Provost -" Version: 2.10 +" Language: Windows PowerShell +" Maintainer: Peter Provost +" Version: 2.9 " Project Repository: https://github.com/PProvost/vim-ps1 -" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327 +" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") | finish | endif @@ -14,23 +14,13 @@ let b:did_ftplugin = 1 setlocal tw=0 setlocal commentstring=#%s setlocal formatoptions=tcqro -" Enable autocompletion of hyphenated PowerShell commands, -" e.g. Get-Content or Get-ADUser -setlocal iskeyword+=- -" MS applications (including PowerShell) require a Byte Order Mark (BOM) for UTF-8. -setlocal bomb " Change the browse dialog on Win32 to show mainly PowerShell-related files if has("gui_win32") - let b:browsefilter = - \ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" . - \ "PowerShell Script Files (*.ps1)\t*.ps1\n" . - \ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" . - \ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" . - \ "All Files (*.*)\t*.*\n" + let b:browsefilter = "PowerShell Files (*.ps1)\t*.ps1\n" . + \ "All Files (*.*)\t*.*\n" endif " Undo the stuff we changed let b:undo_ftplugin = "setlocal tw< cms< fo<" . - \ " | unlet! b:browsefilter" - + \ " | unlet! b:browsefilter" diff --git a/pack/acp/start/vim-ps1/ftplugin/ps1xml.vim b/pack/acp/start/vim-ps1/ftplugin/ps1xml.vim deleted file mode 100644 index 9352b9a..0000000 --- a/pack/acp/start/vim-ps1/ftplugin/ps1xml.vim +++ /dev/null @@ -1,33 +0,0 @@ -" Vim filetype plugin file -" Language: Windows PowerShell -" Maintainer: Peter Provost -" Version: 2.10 -" Project Repository: https://github.com/PProvost/vim-ps1 -" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327 - -" Only do this when not done yet for this buffer -if exists("b:did_ftplugin") | finish | endif - -" Don't load another plug-in for this buffer -let b:did_ftplugin = 1 - -setlocal tw=0 -setlocal commentstring=#%s -setlocal formatoptions=tcqro -" MS applications (including PowerShell) require a Byte Order Mark (BOM) for UTF-8. -setlocal bomb - -" Change the browse dialog on Win32 to show mainly PowerShell-related files -if has("gui_win32") - let b:browsefilter = - \ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" . - \ "PowerShell Script Files (*.ps1)\t*.ps1\n" . - \ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" . - \ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" . - \ "All Files (*.*)\t*.*\n" -endif - -" Undo the stuff we changed -let b:undo_ftplugin = "setlocal tw< cms< fo<" . - \ " | unlet! b:browsefilter" - diff --git a/pack/acp/start/vim-ps1/indent/ps1.vim b/pack/acp/start/vim-ps1/indent/ps1.vim index 8198a50..74bc47e 100644 --- a/pack/acp/start/vim-ps1/indent/ps1.vim +++ b/pack/acp/start/vim-ps1/indent/ps1.vim @@ -1,20 +1,17 @@ " Vim indent file -" Language: Windows PowerShell -" Maintainer: Peter Provost -" Version: 2.10 +" Language: Windows PowerShell +" Maintainer: Peter Provost +" Version: 2.9 " Project Repository: https://github.com/PProvost/vim-ps1 -" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327" +" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327" " Only load this indent file when no other was loaded. if exists("b:did_indent") - finish + finish endif let b:did_indent = 1 -" smartindent is good enough for powershell -setlocal smartindent -" disable the indent removal for # marks -inoremap # X# - -let b:undo_indent = "setl si<" +" PS indenting is like indenting C +setlocal cindent cinoptions& cinoptions+=+0 +let b:undo_indent = "setl cin<" diff --git a/pack/acp/start/vim-ps1/syntax/ps1.vim b/pack/acp/start/vim-ps1/syntax/ps1.vim index d034280..0984305 100644 --- a/pack/acp/start/vim-ps1/syntax/ps1.vim +++ b/pack/acp/start/vim-ps1/syntax/ps1.vim @@ -1,25 +1,17 @@ " Vim syntax file -" Language: Windows PowerShell -" Maintainer: Peter Provost -" Version: 2.10 +" Language: Windows PowerShell +" Maintainer: Peter Provost +" Version: 2.9 " Project Repository: https://github.com/PProvost/vim-ps1 -" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327" -" -" The following settings are available for tuning syntax highlighting: -" let ps1_nofold_blocks = 1 -" let ps1_nofold_sig = 1 -" let ps1_nofold_region = 1 +" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327" " Compatible VIM syntax file start if version < 600 - syntax clear + syntax clear elseif exists("b:current_syntax") - finish + finish endif -" Operators contain dashes -setlocal iskeyword+=- - " PowerShell doesn't care about case syn case ignore @@ -27,15 +19,15 @@ syn case ignore syn sync minlines=100 " Certain tokens can't appear at the top level of the document -syn cluster ps1NotTop contains=@ps1Comment,ps1CDocParam,ps1FunctionDeclaration +syn cluster ps1NotTop contains=@ps1Comment,ps1CDocParam,ps1Function " Comments and special comment words syn keyword ps1CommentTodo TODO FIXME XXX TBD HACK NOTE contained syn match ps1CDocParam /.*/ contained syn match ps1CommentDoc /^\s*\zs\.\w\+\>/ nextgroup=ps1CDocParam contained syn match ps1CommentDoc /#\s*\zs\.\w\+\>/ nextgroup=ps1CDocParam contained -syn match ps1Comment /#.*/ contains=ps1CommentTodo,ps1CommentDoc,@Spell -syn region ps1Comment start="<#" end="#>" contains=ps1CommentTodo,ps1CommentDoc,@Spell +syn match ps1Comment /#.*/ contains=ps1CommentTodo,ps1CommentDoc +syn region ps1Comment start="<#" end="#>" contains=ps1CommentTodo,ps1CommentDoc " Language keywords and elements syn keyword ps1Conditional if else elseif switch default @@ -44,9 +36,10 @@ syn match ps1Repeat /\/ nextgroup=ps1Block skipwhite syn match ps1Keyword /\/ nextgroup=ps1Block skipwhite syn match ps1Keyword /\/ nextgroup=ps1Block skipwhite -syn keyword ps1Exception begin process end exit inlinescript parallel sequence +syn keyword ps1Exception begin process end exit syn keyword ps1Keyword try catch finally throw syn keyword ps1Keyword return filter in trap param data dynamicparam +syn match ps1Keyword /&/ syn keyword ps1Constant $true $false $null syn match ps1Constant +\$?+ syn match ps1Constant +\$_+ @@ -56,70 +49,51 @@ syn match ps1Constant +\$^+ " Keywords reserved for future use syn keyword ps1Keyword class define from using var -" Function declarations -syn keyword ps1Keyword function nextgroup=ps1FunctionDeclaration skipwhite -syn keyword ps1Keyword filter nextgroup=ps1FunctionDeclaration skipwhite -syn keyword ps1Keyword workflow nextgroup=ps1FunctionDeclaration skipwhite -syn keyword ps1Keyword configuration nextgroup=ps1FunctionDeclaration skipwhite -syn keyword ps1Keyword class nextgroup=ps1FunctionDeclaration skipwhite -syn keyword ps1Keyword enum nextgroup=ps1FunctionDeclaration skipwhite -syn match ps1FunctionDeclaration /\w\+\(-\w\+\)*/ contained - -" Function invocations -syn match ps1FunctionInvocation /\w\+\(-\w\+\)\+/ +" Functions and Cmdlets +syn match ps1Cmdlet /\w\+-\w\+/ +syn keyword ps1Keyword function nextgroup=ps1Function skipwhite +syn keyword ps1Keyword filter nextgroup=ps1Function skipwhite +syn match ps1Function /\w\+-*\w*/ contained " Type declarations -syn match ps1Type /\[[a-z_][a-z0-9_.,\[\]]\+\]/ +syn match ps1Type /\[[a-z0-9_:.]\+\(\[\]\)\?\]/ +syn match ps1StandaloneType /[a-z0-9_.]\+/ contained +syn keyword ps1Scope global local private script contained -" Variable references -syn match ps1ScopeModifier /\(global:\|local:\|private:\|script:\)/ contained -syn match ps1Variable /\$\w\+\(:\w\+\)\?/ contains=ps1ScopeModifier -syn match ps1Variable /\${\w\+\(:\w\+\)\?}/ contains=ps1ScopeModifier +" Variables and other user defined items +syn match ps1Variable /\$\w\+/ +syn match ps1Variable /\${\w\+:\\\w\+}/ +syn match ps1ScopedVariable /\$\w\+:\w\+/ contains=ps1Scope +syn match ps1VariableName /\w\+/ contained -" Operators -syn keyword ps1Operator -eq -ne -ge -gt -lt -le -like -notlike -match -notmatch -replace -split -contains -notcontains -syn keyword ps1Operator -ieq -ine -ige -igt -ile -ilt -ilike -inotlike -imatch -inotmatch -ireplace -isplit -icontains -inotcontains -syn keyword ps1Operator -ceq -cne -cge -cgt -clt -cle -clike -cnotlike -cmatch -cnotmatch -creplace -csplit -ccontains -cnotcontains -syn keyword ps1Operator -in -notin -syn keyword ps1Operator -is -isnot -as -join -syn keyword ps1Operator -and -or -not -xor -band -bor -bnot -bxor -syn keyword ps1Operator -f -syn match ps1Operator /!/ -syn match ps1Operator /=/ -syn match ps1Operator /+=/ -syn match ps1Operator /-=/ -syn match ps1Operator /\*=/ -syn match ps1Operator /\/=/ -syn match ps1Operator /%=/ -syn match ps1Operator /+/ -syn match ps1Operator /-\(\s\|\d\|\.\|\$\|(\)\@=/ -syn match ps1Operator /\*/ -syn match ps1Operator /\// -syn match ps1Operator /|/ -syn match ps1Operator /%/ -syn match ps1Operator /&/ -syn match ps1Operator /::/ -syn match ps1Operator /,/ -syn match ps1Operator /\(^\|\s\)\@<=\. \@=/ +" Operators all start w/ dash +syn match ps1OperatorStart /-c\?/ nextgroup=ps1Operator +syn keyword ps1Operator eq ne ge gt lt le like notlike match notmatch replace split /contains/ notcontains contained +syn keyword ps1Operator ieq ine ige igt ile ilt ilike inotlike imatch inotmatch ireplace isplit icontains inotcontains contained +syn keyword ps1Operator ceq cne cge cgt clt cle clike cnotlike cmatch cnotmatch creplace csplit ccontains cnotcontains contained +syn keyword ps1Operator is isnot as join contained +syn keyword ps1Operator and or not xor band bor bnot bxor contained +syn keyword ps1Operator f contained " Regular Strings " These aren't precisely correct and could use some work -syn region ps1String start=/"/ skip=/`"/ end=/"/ contains=@ps1StringSpecial,@Spell +syn region ps1String start=/"/ skip=/`"/ end=/"/ contains=@ps1StringSpecial syn region ps1String start=/'/ skip=/''/ end=/'/ " Here-Strings -syn region ps1String start=/@"$/ end=/^"@/ contains=@ps1StringSpecial,@Spell -syn region ps1String start=/@'$/ end=/^'@/ +syn region ps1String start=/@"$/ end=/^"@$/ contains=@ps1StringSpecial +syn region ps1String start=/@'$/ end=/^'@$/ " Interpolation -syn match ps1Escape /`./ +syn match ps1Escape /`./ contained syn region ps1Interpolation matchgroup=ps1InterpolationDelimiter start="$(" end=")" contained contains=ALLBUT,@ps1NotTop syn region ps1NestedParentheses start="(" skip="\\\\\|\\)" matchgroup=ps1Interpolation end=")" transparent contained -syn cluster ps1StringSpecial contains=ps1Escape,ps1Interpolation,ps1Variable,ps1Boolean,ps1Constant,ps1BuiltIn,@Spell +syn cluster ps1StringSpecial contains=ps1Escape,ps1Interpolation,ps1Variable,ps1Boolean,ps1Constant,ps1BuiltIn " Numbers -syn match ps1Number "\(\<\|-\)\@<=\(0[xX]\x\+\|\d\+\)\([KMGTP][B]\)\=\(\>\|-\)\@=" -syn match ps1Number "\(\(\<\|-\)\@<=\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[dD]\=" +" syn match ps1Number /\<[0-9]\+/ +syn match ps1Number "\<\(0[xX]\x\+\|\d\+\)\([MGTP][B]\)\=\>" +syn match ps1Number "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[dD]\=" syn match ps1Number "\<\d\+[eE][-+]\=\d\+[dD]\=\>" syn match ps1Number "\<\d\+\([eE][-+]\=\d\+\)\=[dD]\>" @@ -132,54 +106,47 @@ syn match ps1BuiltIn "$\%(match\(es\)\?\|myinvocation\|host\|lastexitcode\)\>" syn match ps1BuiltIn "$\%(ofs\|shellid\|stacktrace\)\>" " Folding blocks -if !exists('g:ps1_nofold_blocks') - syn region ps1Block start=/{/ end=/}/ transparent fold -endif - -if !exists('g:ps1_nofold_region') - syn region ps1Region start=/#region/ end=/#endregion/ transparent fold keepend extend -endif - -if !exists('g:ps1_nofold_sig') - syn region ps1Signature start=/# SIG # Begin signature block/ end=/# SIG # End signature block/ transparent fold -endif +syn region ps1Block start=/{/ end=/}/ transparent fold " Setup default color highlighting if version >= 508 || !exists("did_ps1_syn_inits") - if version < 508 - let did_ps1_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif + if version < 508 + let did_ps1_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif HiLink ps1Number Number HiLink ps1Block Block - HiLink ps1Region Region HiLink ps1Exception Exception HiLink ps1Constant Constant - HiLink ps1String String - HiLink ps1Escape SpecialChar - HiLink ps1InterpolationDelimiter Delimiter - HiLink ps1Conditional Conditional - HiLink ps1FunctionDeclaration Function - HiLink ps1FunctionInvocation Function - HiLink ps1Variable Identifier - HiLink ps1Boolean Boolean - HiLink ps1Constant Constant - HiLink ps1BuiltIn StorageClass - HiLink ps1Type Type - HiLink ps1ScopeModifier StorageClass - HiLink ps1Comment Comment - HiLink ps1CommentTodo Todo - HiLink ps1CommentDoc Tag - HiLink ps1CDocParam Todo - HiLink ps1Operator Operator - HiLink ps1Repeat Repeat - HiLink ps1RepeatAndCmdlet Repeat - HiLink ps1Keyword Keyword - HiLink ps1KeywordAndCmdlet Keyword - delcommand HiLink + HiLink ps1String String + HiLink ps1Escape SpecialChar + HiLink ps1InterpolationDelimiter Delimiter + HiLink ps1Conditional Conditional + HiLink ps1Function Function + HiLink ps1Variable Identifier + HiLink ps1ScopedVariable Identifier + HiLink ps1VariableName Identifier + HiLink ps1Boolean Boolean + HiLink ps1Constant Constant + HiLink ps1BuiltIn StorageClass + HiLink ps1Type Type + HiLink ps1Scope Type + HiLink ps1StandaloneType Type + HiLink ps1Number Number + HiLink ps1Comment Comment + HiLink ps1CommentTodo Todo + HiLink ps1CommentDoc Tag + HiLink ps1CDocParam Todo + HiLink ps1Operator Operator + HiLink ps1Repeat Repeat + HiLink ps1RepeatAndCmdlet Repeat + HiLink ps1Keyword Keyword + HiLink ps1KeywordAndCmdlet Keyword + HiLink ps1Cmdlet Statement + delcommand HiLink endif -let b:current_syntax = "ps1" +let b:current_syntax = "powershell" diff --git a/pack/acp/start/vim-ps1/syntax/ps1xml.vim b/pack/acp/start/vim-ps1/syntax/ps1xml.vim deleted file mode 100644 index 02407f5..0000000 --- a/pack/acp/start/vim-ps1/syntax/ps1xml.vim +++ /dev/null @@ -1,56 +0,0 @@ -" Vim syntax file -" Language: Windows PowerShell XML -" Maintainer: Peter Provost -" Version: 2.10 -" Project Repository: https://github.com/PProvost/vim-ps1 -" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327" - -" Compatible VIM syntax file start -if version < 600 - syntax clear -elseif exists("b:current_syntax") - finish -endif - -let s:ps1xml_cpo_save = &cpo -set cpo&vim - -doau syntax xml -unlet b:current_syntax - -syn case ignore -syn include @ps1xmlScriptBlock :p:h/ps1.vim -unlet b:current_syntax - -syn region ps1xmlScriptBlock - \ matchgroup=xmlTag start="" - \ fold - \ contains=@ps1xmlScriptBlock - \ keepend -syn region ps1xmlScriptBlock - \ matchgroup=xmlTag start="" - \ matchgroup=xmlEndTag end="" - \ fold - \ contains=@ps1xmlScriptBlock - \ keepend -syn region ps1xmlScriptBlock - \ matchgroup=xmlTag start="" - \ matchgroup=xmlEndTag end="" - \ fold - \ contains=@ps1xmlScriptBlock - \ keepend -syn region ps1xmlScriptBlock - \ matchgroup=xmlTag start="" - \ matchgroup=xmlEndTag end="" - \ fold - \ contains=@ps1xmlScriptBlock - \ keepend - -syn cluster xmlRegionHook add=ps1xmlScriptBlock - -let b:current_syntax = "ps1xml" - -let &cpo = s:ps1xml_cpo_save -unlet s:ps1xml_cpo_save -