xref: /vim-8.2.3635/runtime/syntax/arch.vim (revision 071d4279)
1" Vim syntax file
2" Language:	    GNU Arch inventory file.
3" Maintainer:	    Nikolai Weibull <[email protected]>
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
8if version < 600
9  syntax clear
10elseif exists("b:current_syntax")
11  finish
12endif
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
17if version >= 600
18  command -nargs=1 SetIsk setlocal iskeyword=<args>
19else
20  command -nargs=1 SetIsk set iskeyword=<args>
21endif
22SetIsk @,48-57,_,-
23delcommand SetIsk
24
25" Todo
26syn keyword archTodo	  TODO FIXME XXX NOTE
27
28" Comment
29syn region  archComment  matchgroup=archComment start='^\%(#\|\s\)' end='$' contains=archTodo
30
31" Keywords
32syn keyword archKeyword  implicit tagline explicit names
33syn keyword archKeyword  untagged-source
34syn keyword archKeyword  exclude junk backup precious unrecognized source skipwhite nextgroup=archRegex
35
36" Regexes
37syn 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
42if 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
56endif
57
58let b:current_syntax = "arch"
59
60" vim: set sts=2 sw=2:
61