Merged from the latest developing branch.
[MacVim/jjgod.git] / runtime / syntax / pamconf.vim
blob46cd3c3095390b01c1cbccb2f88c49b42fc7f629
1 " Vim syntax file
2 " Language:         pam(8) configuration file
3 " Maintainer:       Nikolai Weibull <now@bitwi.se>
4 " Latest Revision:  2006-04-19
7 if exists("b:current_syntax")
8   finish
9 endif
11 let s:cpo_save = &cpo
12 set cpo&vim
14 syn match   pamconfService          '^[[:graph:]]\+'
15                                     \ nextgroup=pamconfType,
16                                     \ pamconfServiceLineCont skipwhite
18 syn keyword pamconfTodo             contained TODO FIXME XXX NOTE
20 syn region  pamconfComment          display oneline start='#' end='$'
21                                     \ contains=pamconfTodo,@Spell
23 syn match   pamconfServiceLineCont  contained '\\$'
24                                     \ nextgroup=pamconfType,
25                                     \ pamconfServiceLineCont skipwhite skipnl
27 syn keyword pamconfType             account auth password session
28                                     \ nextgroup=pamconfControl,
29                                     \ pamconfTypeLineCont skipwhite
31 syn match   pamconfTypeLineCont     contained '\\$'
32                                     \ nextgroup=pamconfControl,
33                                     \ pamconfTypeLineCont skipwhite skipnl
35 syn keyword pamconfControl          contained requisite required sufficient
36                                     \ optional
37                                     \ nextgroup=pamconfMPath,
38                                     \ pamconfControlLineContH skipwhite
40 syn match   pamconfControlBegin     '\[' nextgroup=pamconfControlValues,
41                                     \ pamconfControlLineCont skipwhite
43 syn match   pamconfControlLineCont  contained '\\$'
44                                     \ nextgroup=pamconfControlValues,
45                                     \ pamconfControlLineCont skipwhite skipnl
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
60 syn match   pamconfControlValueEq   contained '=' nextgroup=pamconfControlAction
62 syn match   pamconfControlActionN   contained '\d\+\>'
63                                     \ nextgroup=pamconfControlValues,
64                                     \ pamconfControlLineCont,pamconfControlEnd
65                                     \ skipwhite
66 syn keyword pamconfControlAction    contained ignore bad die ok done reset
67                                     \ nextgroup=pamconfControlValues,
68                                     \ pamconfControlLineCont,pamconfControlEnd
69                                     \ skipwhite
71 syn match   pamconfControlEnd       contained '\]'
72                                     \ nextgroup=pamconfMPath,
73                                     \ pamconfControlLineContH skipwhite
75 syn match   pamconfControlLineContH contained '\\$'
76                                     \ nextgroup=pamconfMPath,
77                                     \ pamconfControlLineContH skipwhite skipnl
79 syn match   pamconfMPath            contained '\S\+'
80                                     \ nextgroup=pamconfMPathLineCont,
81                                     \ pamconfArgs skipwhite
83 syn match   pamconfArgs             contained '\S\+'
84                                     \ nextgroup=pamconfArgsLineCont,
85                                     \ pamconfArgs skipwhite
87 syn match   pamconfMPathLineCont    contained '\\$'
88                                     \ nextgroup=pamconfMPathLineCont,
89                                     \ pamconfArgs skipwhite skipnl
91 syn match   pamconfArgsLineCont     contained '\\$'
92                                     \ nextgroup=pamconfArgsLineCont,
93                                     \ pamconfArgs skipwhite skipnl
95 hi def link pamconfTodo             Todo
96 hi def link pamconfComment          Comment
97 hi def link pamconfService          Statement
98 hi def link pamconfServiceLineCont  Special
99 hi def link pamconfType             Type
100 hi def link pamconfTypeLineCont     pamconfServiceLineCont
101 hi def link pamconfControl          Macro
102 hi def link pamconfControlBegin     Delimiter
103 hi def link pamconfControlLineContH pamconfServiceLineCont
104 hi def link pamconfControlLineCont  pamconfServiceLineCont
105 hi def link pamconfControlValues    Identifier
106 hi def link pamconfControlValueEq   Operator
107 hi def link pamconfControlActionN   Number
108 hi def link pamconfControlAction    Identifier
109 hi def link pamconfControlEnd       Delimiter
110 hi def link pamconfMPath            String
111 hi def link pamconfMPathLineCont    pamconfServiceLineCont
112 hi def link pamconfArgs             Normal
113 hi def link pamconfArgsLineCont     pamconfServiceLineCont
115 let b:current_syntax = "pamconf"
117 let &cpo = s:cpo_save
118 unlet s:cpo_save