375
|
1 " Vim syntax file
|
11062
|
2 " Language: login.access(5) configuration file
|
|
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
|
4 " Latest Revision: 2006-04-19
|
375
|
5
|
|
6 if exists("b:current_syntax")
|
|
7 finish
|
|
8 endif
|
|
9
|
|
10 let s:cpo_save = &cpo
|
|
11 set cpo&vim
|
|
12
|
|
13 syn keyword loginaccessTodo contained TODO FIXME XXX NOTE
|
|
14
|
|
15 syn region loginaccessComment display oneline start='^#' end='$'
|
|
16 \ contains=loginaccessTodo,@Spell
|
|
17
|
|
18 syn match loginaccessBegin display '^'
|
|
19 \ nextgroup=loginaccessPermission,
|
|
20 \ loginaccessComment skipwhite
|
|
21
|
|
22 syn match loginaccessPermission contained display '[^#]'
|
|
23 \ contains=loginaccessPermError
|
|
24 \ nextgroup=loginaccessUserSep
|
|
25
|
|
26 syn match loginaccessPermError contained display '[^+-]'
|
|
27
|
|
28 syn match loginaccessUserSep contained display ':'
|
|
29 \ nextgroup=loginaccessUsers,
|
|
30 \ loginaccessAllUsers,
|
|
31 \ loginaccessExceptUsers
|
|
32
|
|
33 syn match loginaccessUsers contained display '[^, \t:]\+'
|
|
34 \ nextgroup=loginaccessUserIntSep,
|
|
35 \ loginaccessOriginSep
|
|
36
|
|
37 syn match loginaccessAllUsers contained display '\<ALL\>'
|
|
38 \ nextgroup=loginaccessUserIntSep,
|
|
39 \ loginaccessOriginSep
|
|
40
|
|
41 syn match loginaccessLocalUsers contained display '\<LOCAL\>'
|
|
42 \ nextgroup=loginaccessUserIntSep,
|
|
43 \ loginaccessOriginSep
|
|
44
|
|
45 syn match loginaccessExceptUsers contained display '\<EXCEPT\>'
|
|
46 \ nextgroup=loginaccessUserIntSep,
|
|
47 \ loginaccessOriginSep
|
|
48
|
|
49 syn match loginaccessUserIntSep contained display '[, \t]'
|
|
50 \ nextgroup=loginaccessUsers,
|
|
51 \ loginaccessAllUsers,
|
|
52 \ loginaccessExceptUsers
|
|
53
|
|
54 syn match loginaccessOriginSep contained display ':'
|
|
55 \ nextgroup=loginaccessOrigins,
|
|
56 \ loginaccessAllOrigins,
|
|
57 \ loginaccessExceptOrigins
|
|
58
|
|
59 syn match loginaccessOrigins contained display '[^, \t]\+'
|
|
60 \ nextgroup=loginaccessOriginIntSep
|
|
61
|
|
62 syn match loginaccessAllOrigins contained display '\<ALL\>'
|
|
63 \ nextgroup=loginaccessOriginIntSep
|
|
64
|
|
65 syn match loginaccessLocalOrigins contained display '\<LOCAL\>'
|
|
66 \ nextgroup=loginaccessOriginIntSep
|
|
67
|
|
68 syn match loginaccessExceptOrigins contained display '\<EXCEPT\>'
|
|
69 \ nextgroup=loginaccessOriginIntSep
|
|
70
|
|
71 syn match loginaccessOriginIntSep contained display '[, \t]'
|
|
72 \ nextgroup=loginaccessOrigins,
|
|
73 \ loginaccessAllOrigins,
|
|
74 \ loginaccessExceptOrigins
|
|
75
|
|
76 hi def link loginaccessTodo Todo
|
|
77 hi def link loginaccessComment Comment
|
|
78 hi def link loginaccessPermission Type
|
|
79 hi def link loginaccessPermError Error
|
|
80 hi def link loginaccessUserSep Delimiter
|
|
81 hi def link loginaccessUsers Identifier
|
|
82 hi def link loginaccessAllUsers Macro
|
|
83 hi def link loginaccessLocalUsers Macro
|
|
84 hi def link loginaccessExceptUsers Operator
|
|
85 hi def link loginaccessUserIntSep loginaccessUserSep
|
|
86 hi def link loginaccessOriginSep loginaccessUserSep
|
|
87 hi def link loginaccessOrigins Identifier
|
|
88 hi def link loginaccessAllOrigins Macro
|
|
89 hi def link loginaccessLocalOrigins Macro
|
|
90 hi def link loginaccessExceptOrigins loginaccessExceptUsers
|
|
91 hi def link loginaccessOriginIntSep loginaccessUserSep
|
|
92
|
|
93 let b:current_syntax = "loginaccess"
|
|
94
|
|
95 let &cpo = s:cpo_save
|
|
96 unlet s:cpo_save
|