Mercurial > hg > RemoteEditor > vim7
comparison runtime/syntax/dosbatch.vim @ 34:e170173ecb68 current-release
before ack base protocol.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 26 Nov 2008 15:02:10 +0900 |
parents | 76efa0be13f1 |
children | c16898406ff2 |
comparison
equal
deleted
inserted
replaced
33:7d0d8b831f5a | 34:e170173ecb68 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: MSDOS batch file (with NT command extensions) | 2 " Language: MSDOS batch file (with NT command extensions) |
3 " Maintainer: Mike Williams <mrw@eandem.co.uk> | 3 " Maintainer: Mike Williams <mrw@eandem.co.uk> |
4 " Filenames: *.bat | 4 " Filenames: *.bat |
5 " Last Change: 16th March 2004 | 5 " Last Change: 10th May 2008 |
6 " Web Page: http://www.eandem.co.uk/mrw/vim | 6 " Web Page: http://www.eandem.co.uk/mrw/vim |
7 " | 7 " |
8 " Options Flags: | 8 " Options Flags: |
9 " dosbatch_cmdextversion - 1 = Windows NT, 2 = Windows 2000 [default] | 9 " dosbatch_cmdextversion - 1 = Windows NT, 2 = Windows 2000 [default] |
10 " | 10 " |
41 syn match dosbatchOperator "[-+\*/%]=" | 41 syn match dosbatchOperator "[-+\*/%]=" |
42 syn match dosbatchOperator "\s\(&\||\|^\|<<\|>>\)=\=\s" | 42 syn match dosbatchOperator "\s\(&\||\|^\|<<\|>>\)=\=\s" |
43 syn match dosbatchIfOperator "if\s\+\(\(not\)\=\s\+\)\=\(exist\|defined\|errorlevel\|cmdextversion\)\="lc=2 | 43 syn match dosbatchIfOperator "if\s\+\(\(not\)\=\s\+\)\=\(exist\|defined\|errorlevel\|cmdextversion\)\="lc=2 |
44 | 44 |
45 " String - using "'s is a convenience rather than a requirement outside of FOR | 45 " String - using "'s is a convenience rather than a requirement outside of FOR |
46 syn match dosbatchString "\"[^"]*\"" contains=dosbatchVariable,dosBatchArgument,@dosbatchNumber | 46 syn match dosbatchString "\"[^"]*\"" contains=dosbatchVariable,dosBatchArgument,dosbatchSpecialChar,@dosbatchNumber,@Spell |
47 syn match dosbatchString "\<echo[^)>|]*"lc=4 contains=dosbatchVariable,dosbatchArgument,@dosbatchNumber | 47 syn match dosbatchString "\<echo\([^)>|]\|\^\@<=[)>|]\)*"lc=4 contains=dosbatchVariable,dosbatchArgument,dosbatchSpecialChar,@dosbatchNumber,@Spell |
48 syn match dosbatchEchoOperator "\<echo\s\+\(on\|off\)\s*$"lc=4 | 48 syn match dosbatchEchoOperator "\<echo\s\+\(on\|off\)\s*$"lc=4 |
49 | 49 |
50 " For embedded commands | 50 " For embedded commands |
51 syn match dosbatchCmd "(\s*'[^']*'"lc=1 contains=dosbatchString,dosbatchVariable,dosBatchArgument,@dosbatchNumber,dosbatchImplicit,dosbatchStatement,dosbatchConditional,dosbatchRepeat,dosbatchOperator | 51 syn match dosbatchCmd "(\s*'[^']*'"lc=1 contains=dosbatchString,dosbatchVariable,dosBatchArgument,@dosbatchNumber,dosbatchImplicit,dosbatchStatement,dosbatchConditional,dosbatchRepeat,dosbatchOperator |
52 | 52 |
89 syn match dosbatchLabel "\<\(goto\|call\)\s\+:\h\w*\>"lc=4 | 89 syn match dosbatchLabel "\<\(goto\|call\)\s\+:\h\w*\>"lc=4 |
90 syn match dosbatchLabel "\<goto\s\+\h\w*\>"lc=4 | 90 syn match dosbatchLabel "\<goto\s\+\h\w*\>"lc=4 |
91 syn match dosbatchLabel ":\h\w*\>" | 91 syn match dosbatchLabel ":\h\w*\>" |
92 | 92 |
93 " Comments - usual rem but also two colons as first non-space is an idiom | 93 " Comments - usual rem but also two colons as first non-space is an idiom |
94 syn match dosbatchComment "^rem\($\|\s.*$\)"lc=3 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument | 94 syn match dosbatchComment "^rem\($\|\s.*$\)"lc=3 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell |
95 syn match dosbatchComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument | 95 syn match dosbatchComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell |
96 syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument | 96 syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell |
97 | 97 |
98 " Comments in ()'s - still to handle spaces before rem | 98 " Comments in ()'s - still to handle spaces before rem |
99 syn match dosbatchComment "(rem[^)]*"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument | 99 syn match dosbatchComment "(rem\([^)]\|\^\@<=)\)*"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell |
100 | 100 |
101 syn keyword dosbatchImplicit append assoc at attrib break cacls cd chcp chdir | 101 syn keyword dosbatchImplicit append assoc at attrib break cacls cd chcp chdir |
102 syn keyword dosbatchImplicit chkdsk chkntfs cls cmd color comp compact convert copy | 102 syn keyword dosbatchImplicit chkdsk chkntfs cls cmd color comp compact convert copy |
103 syn keyword dosbatchImplicit date del dir diskcomp diskcopy doskey echo endlocal | 103 syn keyword dosbatchImplicit date del dir diskcomp diskcopy doskey echo endlocal |
104 syn keyword dosbatchImplicit erase fc find findstr format ftype | 104 syn keyword dosbatchImplicit erase fc find findstr format ftype |
125 HiLink dosbatchCommands dosbatchStatement | 125 HiLink dosbatchCommands dosbatchStatement |
126 HiLink dosbatchLabel Label | 126 HiLink dosbatchLabel Label |
127 HiLink dosbatchConditional Conditional | 127 HiLink dosbatchConditional Conditional |
128 HiLink dosbatchRepeat Repeat | 128 HiLink dosbatchRepeat Repeat |
129 | 129 |
130 HiLink dosbatchOperator Operator | 130 HiLink dosbatchOperator Operator |
131 HiLink dosbatchEchoOperator dosbatchOperator | 131 HiLink dosbatchEchoOperator dosbatchOperator |
132 HiLink dosbatchIfOperator dosbatchOperator | 132 HiLink dosbatchIfOperator dosbatchOperator |
133 | 133 |
134 HiLink dosbatchArgument Identifier | 134 HiLink dosbatchArgument Identifier |
135 HiLink dosbatchIdentifier Identifier | 135 HiLink dosbatchIdentifier Identifier |
136 HiLink dosbatchVariable dosbatchIdentifier | 136 HiLink dosbatchVariable dosbatchIdentifier |
137 | 137 |
138 HiLink dosbatchSpecialChar SpecialChar | 138 HiLink dosbatchSpecialChar SpecialChar |
139 HiLink dosbatchString String | 139 HiLink dosbatchString String |
140 HiLink dosbatchNumber Number | 140 HiLink dosbatchNumber Number |