| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
if version < 600 |
| 7 |
syntax clear |
| 8 |
elseif exists("b:current_syntax") |
| 9 |
finish |
| 10 |
endif |
| 11 |
|
| 12 |
|
| 13 |
syn case ignore |
| 14 |
|
| 15 |
|
| 16 |
syn match groupsDefaultValue "\(:\|=\)\s*\w\+$"ms=s+1 contained |
| 17 |
syn match groupsColonValue "\(:\|=\).*" contained contains=groupsDefaultValue |
| 18 |
syn match groupsDefaultKey "^default\(:\|=\).*$" contains=groupsColonValue |
| 19 |
syn match groupsGroupsDirKey "^\(groupsdir\|confdir\|autodir\)\(:\|=\).*$" contains=groupsKeys,groupsVars |
| 20 |
|
| 21 |
|
| 22 |
syn match groupsVars "\(\$GROUP\|\$NODE\|$SOURCE\|$CFGDIR\)" contained |
| 23 |
syn match groupsKeys "^\w\+\(:\|=\)"me=e-1 contained |
| 24 |
syn match groupsKeyValue "^\(map\|all\|list\|reverse\|cache_time\)\+\(:\|=\).*$" contains=groupsKeys,groupsVars |
| 25 |
|
| 26 |
syn match groupsComment "#.*$" |
| 27 |
syn match groupsComment ";.*$" |
| 28 |
syn match groupsHeader "\[\w\+\(,\w\+\)*\]" contains=gHdrSource,gHdrSourceDelim |
| 29 |
syn match groupsMainHeader "\[Main\]" |
| 30 |
|
| 31 |
syn match gHdrSource '[^,]' contained |
| 32 |
syn match gHdrSourceDelim ',' contained |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
if version >= 508 || !exists("did_groupsconf_syntax_inits") |
| 38 |
if version < 508 |
| 39 |
let did_groupsconf_syntax_inits = 1 |
| 40 |
command -nargs=+ HiLink hi link <args> |
| 41 |
else |
| 42 |
command -nargs=+ HiLink hi def link <args> |
| 43 |
endif |
| 44 |
|
| 45 |
HiLink gHdrSource Keyword |
| 46 |
HiLink gHdrSourceDelim Delimiter |
| 47 |
HiLink groupsComment Comment |
| 48 |
HiLink groupsMainHeader Constant |
| 49 |
HiLink groupsDefaultKey Identifier |
| 50 |
HiLink groupsDefaultValue Special |
| 51 |
HiLink groupsKeys Identifier |
| 52 |
HiLink groupsVars Keyword |
| 53 |
|
| 54 |
delcommand HiLink |
| 55 |
endif |
| 56 |
|
| 57 |
let b:current_syntax = "groupsconf" |
| 58 |
|
| 59 |
|