7
|
1 " Vim syntax file
|
|
2 " Language: GNU Arch inventory file.
|
|
3 " Maintainer: Nikolai Weibull <source@pcppopper.org>
|
|
4 " URL: http://www.pcppopper.org/vim/syntax/pcp/arch/
|
|
5 " Latest Revision: 2004-05-22
|
|
6 " arch-tag: 529d60c4-53d8-4d3a-80d6-54ada86d9932
|
|
7
|
|
8 if version < 600
|
|
9 syntax clear
|
|
10 elseif exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13
|
|
14 " Set iskeyword since we need `-' (and potentially others) in keywords.
|
|
15 " For version 5.x: Set it globally
|
|
16 " For version 6.x: Set it locally
|
|
17 if version >= 600
|
|
18 command -nargs=1 SetIsk setlocal iskeyword=<args>
|
|
19 else
|
|
20 command -nargs=1 SetIsk set iskeyword=<args>
|
|
21 endif
|
|
22 SetIsk @,48-57,_,-
|
|
23 delcommand SetIsk
|
|
24
|
|
25 " Todo
|
|
26 syn keyword archTodo TODO FIXME XXX NOTE
|
|
27
|
|
28 " Comment
|
|
29 syn region archComment matchgroup=archComment start='^\%(#\|\s\)' end='$' contains=archTodo
|
|
30
|
|
31 " Keywords
|
|
32 syn keyword archKeyword implicit tagline explicit names
|
|
33 syn keyword archKeyword untagged-source
|
|
34 syn keyword archKeyword exclude junk backup precious unrecognized source skipwhite nextgroup=archRegex
|
|
35
|
|
36 " Regexes
|
|
37 syn match archRegex contained '\s*\zs.*'
|
|
38
|
|
39 " Define the default highlighting.
|
|
40 " For version 5.7 and earlier: only when not done already
|
|
41 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
42 if version >= 508 || !exists("did_arch_syn_inits")
|
|
43 if version < 508
|
|
44 let did_arch_syn_inits = 1
|
|
45 command -nargs=+ HiLink hi link <args>
|
|
46 else
|
|
47 command -nargs=+ HiLink hi def link <args>
|
|
48 endif
|
|
49
|
|
50 HiLink archTodo Todo
|
|
51 HiLink archComment Comment
|
|
52 HiLink archKeyword Keyword
|
|
53 HiLink archRegex String
|
|
54
|
|
55 delcommand HiLink
|
|
56 endif
|
|
57
|
|
58 let b:current_syntax = "arch"
|
|
59
|
|
60 " vim: set sts=2 sw=2:
|