Fix line endings

master
Dustin C. Hatch 2012-01-14 21:04:33 -06:00
parent d6048b1758
commit 96b0e3125e
5 changed files with 152 additions and 150 deletions

2
.hgeol Normal file
View File

@ -0,0 +1,2 @@
[patterns]
re:.* = native

View File

@ -1 +1 @@
autocmd BufRead,BufNewFile *.ps1 set filetype=ps1 autocmd BufRead,BufNewFile *.ps1 set filetype=ps1

View File

@ -1,27 +1,27 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: Windows PowerShell " Language: Windows PowerShell
" Maintainer: Peter Provost <peter@provost.org> " Maintainer: Peter Provost <peter@provost.org>
" Version: 1.0 " Version: 1.0
" "
" $LastChangedDate $ " $LastChangedDate $
" $Rev $ " $Rev $
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif if exists("b:did_ftplugin") | finish | endif
" Don't load another plug-in for this buffer " Don't load another plug-in for this buffer
let b:did_ftplugin = 1 let b:did_ftplugin = 1
setlocal tw=0 setlocal tw=0
setlocal commentstring=#%s setlocal commentstring=#%s
setlocal formatoptions=tcqro setlocal formatoptions=tcqro
" Change the browse dialog on Win32 to show mainly PowerShell-related files " Change the browse dialog on Win32 to show mainly PowerShell-related files
if has("gui_win32") if has("gui_win32")
let b:browsefilter = "PowerShell Files (*.ps1)\t*.ps1\n" . let b:browsefilter = "PowerShell Files (*.ps1)\t*.ps1\n" .
\ "All Files (*.*)\t*.*\n" \ "All Files (*.*)\t*.*\n"
endif endif
" Undo the stuff we changed " Undo the stuff we changed
let b:undo_ftplugin = "setlocal tw< cms< fo<" . let b:undo_ftplugin = "setlocal tw< cms< fo<" .
\ " | unlet! b:browsefilter" \ " | unlet! b:browsefilter"

View File

@ -1,18 +1,18 @@
" Vim indent file " Vim indent file
" Language: Windows PowerShell " Language: Windows PowerShell
" Maintainer: Peter Provost <peter@provost.org> " Maintainer: Peter Provost <peter@provost.org>
" Version: 1.0 " Version: 1.0
" "
" $LastChangedDate $ " $LastChangedDate $
" $Rev $ " $Rev $
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
finish finish
endif endif
let b:did_indent = 1 let b:did_indent = 1
" PS indenting is like indenting C " PS indenting is like indenting C
setlocal cindent cinoptions& cinoptions+=+0 setlocal cindent cinoptions& cinoptions+=+0
let b:undo_indent = "setl cin<" let b:undo_indent = "setl cin<"

View File

@ -1,104 +1,104 @@
" Vim syntax file " Vim syntax file
" Language: Windows PowerShell " Language: Windows PowerShell
" Maintainer: Peter Provost <peter@provost.org> " Maintainer: Peter Provost <peter@provost.org>
" Version: 2.7 " Version: 2.7
" Url: http://www.vim.org/scripts/script.php?script_id=1327 " Url: http://www.vim.org/scripts/script.php?script_id=1327
" "
" $LastChangedDate: 2007-03-05 21:18:39 -0800 (Mon, 05 Mar 2007) $ " $LastChangedDate: 2007-03-05 21:18:39 -0800 (Mon, 05 Mar 2007) $
" $Rev: 58 $ " $Rev: 58 $
" "
" Contributions by: " Contributions by:
" Jared Parsons <jaredp@beanseed.org> " Jared Parsons <jaredp@beanseed.org>
" Heath Stewart <heaths@microsoft.com> " Heath Stewart <heaths@microsoft.com>
" Compatible VIM syntax file start " Compatible VIM syntax file start
if version < 600 if version < 600
syntax clear syntax clear
elseif exists("b:current_syntax") elseif exists("b:current_syntax")
finish finish
endif endif
" PowerShell doesn't care about case " PowerShell doesn't care about case
syn case ignore syn case ignore
" Sync-ing method " Sync-ing method
syn sync minlines=100 syn sync minlines=100
" Comments and special comment words " Comments and special comment words
syn keyword ps1CommentTodo TODO FIXME XXX TBD HACK contained syn keyword ps1CommentTodo TODO FIXME XXX TBD HACK contained
syn match ps1Comment /#.*/ contains=ps1CommentTodo syn match ps1Comment /#.*/ contains=ps1CommentTodo
" Language keywords and elements " Language keywords and elements
syn keyword ps1Conditional if else elseif switch syn keyword ps1Conditional if else elseif switch
syn keyword ps1Repeat while default for do until break continue syn keyword ps1Repeat while default for do until break continue
syn match ps1Repeat /\<foreach\>/ nextgroup=ps1Cmdlet syn match ps1Repeat /\<foreach\>/ nextgroup=ps1Cmdlet
syn keyword ps1Keyword return filter in trap throw param begin process end syn keyword ps1Keyword return filter in trap throw param begin process end
syn match ps1Keyword /\<while\>/ nextgroup=ps1Cmdlet syn match ps1Keyword /\<while\>/ nextgroup=ps1Cmdlet
" Functions and Cmdlets " Functions and Cmdlets
syn match ps1Cmdlet /\w\+-\w\+/ syn match ps1Cmdlet /\w\+-\w\+/
syn keyword ps1Keyword function nextgroup=ps1Function skipwhite syn keyword ps1Keyword function nextgroup=ps1Function skipwhite
syn match ps1Function /\w\+-*\w*/ contained syn match ps1Function /\w\+-*\w*/ contained
" Type declarations " Type declarations
syn match ps1Type /\[[a-z0-9_:.]\+\(\[\]\)\?\]/ syn match ps1Type /\[[a-z0-9_:.]\+\(\[\]\)\?\]/
syn match ps1StandaloneType /[a-z0-9_.]\+/ contained syn match ps1StandaloneType /[a-z0-9_.]\+/ contained
syn keyword ps1Scope global local private script contained syn keyword ps1Scope global local private script contained
" Variables and other user defined items " Variables and other user defined items
syn match ps1Variable /\$\w\+/ syn match ps1Variable /\$\w\+/
syn match ps1Variable /\${\w\+:\\\w\+}/ syn match ps1Variable /\${\w\+:\\\w\+}/
syn match ps1ScopedVariable /\$\w\+:\w\+/ contains=ps1Scope syn match ps1ScopedVariable /\$\w\+:\w\+/ contains=ps1Scope
syn match ps1VariableName /\w\+/ contained syn match ps1VariableName /\w\+/ contained
" Operators all start w/ dash " Operators all start w/ dash
syn match ps1OperatorStart /-c\?/ nextgroup=ps1Operator syn match ps1OperatorStart /-c\?/ nextgroup=ps1Operator
syn keyword ps1Operator eq ne ge gt lt le like notlike match notmatch replace /contains/ notcontains contained syn keyword ps1Operator eq ne ge gt lt le like notlike match notmatch replace /contains/ notcontains contained
syn keyword ps1Operator ieq ine ige igt ile ilt ilike inotlike imatch inotmatch ireplace icontains inotcontains contained syn keyword ps1Operator ieq ine ige igt ile ilt ilike inotlike imatch inotmatch ireplace icontains inotcontains contained
syn keyword ps1Operator ceq cne cge cgt clt cle clike cnotlike cmatch cnotmatch creplace ccontains cnotcontains contained syn keyword ps1Operator ceq cne cge cgt clt cle clike cnotlike cmatch cnotmatch creplace ccontains cnotcontains contained
syn keyword ps1Operator is isnot as syn keyword ps1Operator is isnot as
syn keyword ps1Operator and or band bor not syn keyword ps1Operator and or band bor not
syn keyword ps1Operator f syn keyword ps1Operator f
" Regular Strings " Regular Strings
syn region ps1String start=/"/ skip=/`"/ end=/"/ syn region ps1String start=/"/ skip=/`"/ end=/"/
syn region ps1String start=/'/ end=/'/ syn region ps1String start=/'/ end=/'/
" Here-Strings " Here-Strings
syn region ps1String start=/@"$/ end=/^"@$/ syn region ps1String start=/@"$/ end=/^"@$/
syn region ps1String start=/@'$/ end=/^'@$/ syn region ps1String start=/@'$/ end=/^'@$/
" Numbers " Numbers
syn match ps1Number /\<[0-9]\+/ syn match ps1Number /\<[0-9]\+/
" Setup default color highlighting " Setup default color highlighting
if version >= 508 || !exists("did_ps1_syn_inits") if version >= 508 || !exists("did_ps1_syn_inits")
if version < 508 if version < 508
let did_ps1_syn_inits = 1 let did_ps1_syn_inits = 1
command -nargs=+ HiLink hi link <args> command -nargs=+ HiLink hi link <args>
else else
command -nargs=+ HiLink hi def link <args> command -nargs=+ HiLink hi def link <args>
endif endif
HiLink ps1String String HiLink ps1String String
HiLink ps1Conditional Conditional HiLink ps1Conditional Conditional
HiLink ps1Function Function HiLink ps1Function Function
HiLink ps1Variable Identifier HiLink ps1Variable Identifier
HiLink ps1ScopedVariable Identifier HiLink ps1ScopedVariable Identifier
HiLink ps1VariableName Identifier HiLink ps1VariableName Identifier
HiLink ps1Type Type HiLink ps1Type Type
HiLink ps1Scope Type HiLink ps1Scope Type
HiLink ps1StandaloneType Type HiLink ps1StandaloneType Type
HiLink ps1Number Number HiLink ps1Number Number
HiLink ps1Comment Comment HiLink ps1Comment Comment
HiLink ps1CommentTodo Todo HiLink ps1CommentTodo Todo
HiLink ps1Operator Operator HiLink ps1Operator Operator
HiLink ps1Repeat Repeat HiLink ps1Repeat Repeat
HiLink ps1RepeatAndCmdlet Repeat HiLink ps1RepeatAndCmdlet Repeat
HiLink ps1Keyword Keyword HiLink ps1Keyword Keyword
HiLink ps1KeywordAndCmdlet Keyword HiLink ps1KeywordAndCmdlet Keyword
HiLink ps1Cmdlet Statement HiLink ps1Cmdlet Statement
delcommand HiLink delcommand HiLink
endif endif
let b:current_syntax = "powershell" let b:current_syntax = "powershell"