7
|
1 " Language: tags
|
6479
|
2 " Maintainer: Charles E. Campbell <NdrOchip@PcampbellAfamily.Mbiz>
|
|
3 " Last Change: Oct 23, 2014
|
|
4 " Version: 4
|
|
5 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TAGS
|
7
|
6
|
|
7 " For version 5.x: Clear all syntax items
|
|
8 " For version 6.x: Quit when a syntax file was already loaded
|
|
9 if version < 600
|
|
10 syntax clear
|
|
11 elseif exists("b:current_syntax")
|
|
12 finish
|
|
13 endif
|
|
14
|
|
15 syn match tagName "^[^\t]\+" skipwhite nextgroup=tagPath
|
|
16 syn match tagPath "[^\t]\+" contained skipwhite nextgroup=tagAddr contains=tagBaseFile
|
|
17 syn match tagBaseFile "[a-zA-Z_]\+[\.a-zA-Z_0-9]*\t"me=e-1 contained
|
|
18 syn match tagAddr "\d*" contained skipwhite nextgroup=tagComment
|
|
19 syn region tagAddr matchgroup=tagDelim start="/" skip="\(\\\\\)*\\/" matchgroup=tagDelim end="$\|/" oneline contained skipwhite nextgroup=tagComment
|
|
20 syn match tagComment ";.*$" contained contains=tagField
|
|
21 syn match tagComment "^!_TAG_.*$"
|
|
22 syn match tagField contained "[a-z]*:"
|
|
23
|
|
24 " Define the default highlighting.
|
|
25 " For version 5.7 and earlier: only when not done already
|
|
26 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
27 if version >= 508 || !exists("did_drchip_tags_inits")
|
|
28 if version < 508
|
|
29 let did_drchip_tags_inits = 1
|
|
30 command -nargs=+ HiLink hi link <args>
|
|
31 else
|
|
32 command -nargs=+ HiLink hi def link <args>
|
|
33 endif
|
|
34
|
|
35 HiLink tagBaseFile PreProc
|
|
36 HiLink tagComment Comment
|
|
37 HiLink tagDelim Delimiter
|
|
38 HiLink tagField Number
|
|
39 HiLink tagName Identifier
|
|
40 HiLink tagPath PreProc
|
|
41
|
|
42 delcommand HiLink
|
|
43 endif
|
|
44
|
|
45 let b:current_syntax = "tags"
|
|
46
|
|
47 " vim: ts=12
|