375
|
1 " Vim syntax file
|
11062
|
2 " Language: pam(8) configuration file
|
|
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
|
4 " Latest Revision: 2011-08-03
|
375
|
5
|
|
6
|
|
7 if exists("b:current_syntax")
|
|
8 finish
|
|
9 endif
|
|
10
|
|
11 let s:cpo_save = &cpo
|
|
12 set cpo&vim
|
|
13
|
|
14 syn match pamconfService '^[[:graph:]]\+'
|
|
15 \ nextgroup=pamconfType,
|
|
16 \ pamconfServiceLineCont skipwhite
|
|
17
|
|
18 syn keyword pamconfTodo contained TODO FIXME XXX NOTE
|
|
19
|
|
20 syn region pamconfComment display oneline start='#' end='$'
|
|
21 \ contains=pamconfTodo,@Spell
|
|
22
|
|
23 syn match pamconfServiceLineCont contained '\\$'
|
|
24 \ nextgroup=pamconfType,
|
|
25 \ pamconfServiceLineCont skipwhite skipnl
|
|
26
|
|
27 syn keyword pamconfType account auth password session
|
|
28 \ nextgroup=pamconfControl,
|
|
29 \ pamconfTypeLineCont skipwhite
|
|
30
|
|
31 syn match pamconfTypeLineCont contained '\\$'
|
|
32 \ nextgroup=pamconfControl,
|
|
33 \ pamconfTypeLineCont skipwhite skipnl
|
|
34
|
|
35 syn keyword pamconfControl contained requisite required sufficient
|
3082
|
36 \ optional include substack
|
375
|
37 \ nextgroup=pamconfMPath,
|
|
38 \ pamconfControlLineContH skipwhite
|
|
39
|
|
40 syn match pamconfControlBegin '\[' nextgroup=pamconfControlValues,
|
|
41 \ pamconfControlLineCont skipwhite
|
|
42
|
|
43 syn match pamconfControlLineCont contained '\\$'
|
|
44 \ nextgroup=pamconfControlValues,
|
|
45 \ pamconfControlLineCont skipwhite skipnl
|
|
46
|
|
47 syn keyword pamconfControlValues contained success open_err symbol_err
|
|
48 \ service_err system_err buf_err
|
|
49 \ perm_denied auth_err cred_insufficient
|
|
50 \ authinfo_unavail user_unknown maxtries
|
|
51 \ new_authtok_reqd acct_expired session_err
|
|
52 \ cred_unavail cred_expired cred_err
|
|
53 \ no_module_data conv_err authtok_err
|
|
54 \ authtok_recover_err authtok_lock_busy
|
|
55 \ authtok_disable_aging try_again ignore
|
|
56 \ abort authtok_expired module_unknown
|
|
57 \ bad_item and default
|
|
58 \ nextgroup=pamconfControlValueEq
|
|
59
|
3082
|
60 syn match pamconfControlValueEq contained '='
|
|
61 \ nextgroup=pamconfControlActionN,
|
|
62 \ pamconfControlAction
|
375
|
63
|
|
64 syn match pamconfControlActionN contained '\d\+\>'
|
|
65 \ nextgroup=pamconfControlValues,
|
|
66 \ pamconfControlLineCont,pamconfControlEnd
|
|
67 \ skipwhite
|
|
68 syn keyword pamconfControlAction contained ignore bad die ok done reset
|
|
69 \ nextgroup=pamconfControlValues,
|
|
70 \ pamconfControlLineCont,pamconfControlEnd
|
|
71 \ skipwhite
|
|
72
|
|
73 syn match pamconfControlEnd contained '\]'
|
|
74 \ nextgroup=pamconfMPath,
|
|
75 \ pamconfControlLineContH skipwhite
|
|
76
|
|
77 syn match pamconfControlLineContH contained '\\$'
|
|
78 \ nextgroup=pamconfMPath,
|
|
79 \ pamconfControlLineContH skipwhite skipnl
|
|
80
|
|
81 syn match pamconfMPath contained '\S\+'
|
|
82 \ nextgroup=pamconfMPathLineCont,
|
|
83 \ pamconfArgs skipwhite
|
|
84
|
|
85 syn match pamconfArgs contained '\S\+'
|
|
86 \ nextgroup=pamconfArgsLineCont,
|
|
87 \ pamconfArgs skipwhite
|
|
88
|
|
89 syn match pamconfMPathLineCont contained '\\$'
|
|
90 \ nextgroup=pamconfMPathLineCont,
|
|
91 \ pamconfArgs skipwhite skipnl
|
|
92
|
|
93 syn match pamconfArgsLineCont contained '\\$'
|
|
94 \ nextgroup=pamconfArgsLineCont,
|
|
95 \ pamconfArgs skipwhite skipnl
|
|
96
|
|
97 hi def link pamconfTodo Todo
|
|
98 hi def link pamconfComment Comment
|
|
99 hi def link pamconfService Statement
|
|
100 hi def link pamconfServiceLineCont Special
|
|
101 hi def link pamconfType Type
|
|
102 hi def link pamconfTypeLineCont pamconfServiceLineCont
|
|
103 hi def link pamconfControl Macro
|
|
104 hi def link pamconfControlBegin Delimiter
|
|
105 hi def link pamconfControlLineContH pamconfServiceLineCont
|
|
106 hi def link pamconfControlLineCont pamconfServiceLineCont
|
|
107 hi def link pamconfControlValues Identifier
|
|
108 hi def link pamconfControlValueEq Operator
|
|
109 hi def link pamconfControlActionN Number
|
|
110 hi def link pamconfControlAction Identifier
|
|
111 hi def link pamconfControlEnd Delimiter
|
|
112 hi def link pamconfMPath String
|
|
113 hi def link pamconfMPathLineCont pamconfServiceLineCont
|
|
114 hi def link pamconfArgs Normal
|
|
115 hi def link pamconfArgsLineCont pamconfServiceLineCont
|
|
116
|
|
117 let b:current_syntax = "pamconf"
|
|
118
|
|
119 let &cpo = s:cpo_save
|
|
120 unlet s:cpo_save
|