annotate runtime/syntax/pamconf.vim @ 34700:24fb114b2f2c

runtime(pamconf): add support for Debian specific @includes Commit: https://github.com/vim/vim/commit/807fff135d52fe8e6e799b78b80cccb299d246a9 Author: Christian Brabandt <cb@256bit.org> Date: Sun Mar 31 18:04:21 2024 +0200 runtime(pamconf): add support for Debian specific @includes fixes: https://github.com/vim/vim/issues/14335 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 31 Mar 2024 18:15:02 +0200
parents 1b345fb68ae3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
1 " Vim syntax file
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 3082
diff changeset
2 " Language: pam(8) configuration file
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 3082
diff changeset
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
34700
24fb114b2f2c runtime(pamconf): add support for Debian specific @includes
Christian Brabandt <cb@256bit.org>
parents: 21676
diff changeset
4 " Latest Change: 2024/03/31
21676
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
5 " Changes By: Haochen Tong
34700
24fb114b2f2c runtime(pamconf): add support for Debian specific @includes
Christian Brabandt <cb@256bit.org>
parents: 21676
diff changeset
6 " Vim Project for the @include syntax
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
7
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
8 if exists("b:current_syntax")
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
9 finish
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
10 endif
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
11
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
12 let s:cpo_save = &cpo
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
13 set cpo&vim
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
14
21676
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
15 let s:has_service_field = exists("b:pamconf_has_service_field")
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
16 \ ? b:pamconf_has_service_field
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
17 \ : expand('%:t') == 'pam.conf' ? 1 : 0
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
18
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
19 syn match pamconfType '-\?[[:alpha:]]\+'
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
20 \ contains=pamconfTypeKeyword
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
21 \ nextgroup=pamconfControl,
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
22 \ pamconfTypeLineCont skipwhite
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
23
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
24 syn keyword pamconfTypeKeyword contained account auth password session
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
25
34700
24fb114b2f2c runtime(pamconf): add support for Debian specific @includes
Christian Brabandt <cb@256bit.org>
parents: 21676
diff changeset
26 " The @include syntax is Debian specific
24fb114b2f2c runtime(pamconf): add support for Debian specific @includes
Christian Brabandt <cb@256bit.org>
parents: 21676
diff changeset
27 syn match pamconfInclude '^@include'
24fb114b2f2c runtime(pamconf): add support for Debian specific @includes
Christian Brabandt <cb@256bit.org>
parents: 21676
diff changeset
28 \ nextgroup=pamconfIncludeFile
24fb114b2f2c runtime(pamconf): add support for Debian specific @includes
Christian Brabandt <cb@256bit.org>
parents: 21676
diff changeset
29 \ skipwhite
24fb114b2f2c runtime(pamconf): add support for Debian specific @includes
Christian Brabandt <cb@256bit.org>
parents: 21676
diff changeset
30
24fb114b2f2c runtime(pamconf): add support for Debian specific @includes
Christian Brabandt <cb@256bit.org>
parents: 21676
diff changeset
31 syn match pamconfIncludeFile '\f\+$'
24fb114b2f2c runtime(pamconf): add support for Debian specific @includes
Christian Brabandt <cb@256bit.org>
parents: 21676
diff changeset
32
21676
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
33 if s:has_service_field
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
34 syn match pamconfService '^[[:graph:]]\+'
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
35 \ nextgroup=pamconfType,
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
36 \ pamconfServiceLineCont skipwhite
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
37
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
38 syn match pamconfServiceLineCont contained '\\$'
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
39 \ nextgroup=pamconfType,
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
40 \ pamconfServiceLineCont skipwhite skipnl
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
41 endif
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
42
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
43 syn keyword pamconfTodo contained TODO FIXME XXX NOTE
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
44
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
45 syn region pamconfComment display oneline start='#' end='$'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
46 \ contains=pamconfTodo,@Spell
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
47
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
48 syn match pamconfTypeLineCont contained '\\$'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
49 \ nextgroup=pamconfControl,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
50 \ pamconfTypeLineCont skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
51
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
52 syn keyword pamconfControl contained requisite required sufficient
3082
3502a7f991fc Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 839
diff changeset
53 \ optional include substack
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
54 \ nextgroup=pamconfMPath,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
55 \ pamconfControlLineContH skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
56
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
57 syn match pamconfControlBegin '\[' nextgroup=pamconfControlValues,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
58 \ pamconfControlLineCont skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
59
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
60 syn match pamconfControlLineCont contained '\\$'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
61 \ nextgroup=pamconfControlValues,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
62 \ pamconfControlLineCont skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
63
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
64 syn keyword pamconfControlValues contained success open_err symbol_err
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
65 \ service_err system_err buf_err
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
66 \ perm_denied auth_err cred_insufficient
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
67 \ authinfo_unavail user_unknown maxtries
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
68 \ new_authtok_reqd acct_expired session_err
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
69 \ cred_unavail cred_expired cred_err
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
70 \ no_module_data conv_err authtok_err
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
71 \ authtok_recover_err authtok_lock_busy
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
72 \ authtok_disable_aging try_again ignore
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
73 \ abort authtok_expired module_unknown
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
74 \ bad_item and default
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
75 \ nextgroup=pamconfControlValueEq
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
76
3082
3502a7f991fc Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 839
diff changeset
77 syn match pamconfControlValueEq contained '='
3502a7f991fc Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 839
diff changeset
78 \ nextgroup=pamconfControlActionN,
3502a7f991fc Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 839
diff changeset
79 \ pamconfControlAction
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
80
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
81 syn match pamconfControlActionN contained '\d\+\>'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
82 \ nextgroup=pamconfControlValues,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
83 \ pamconfControlLineCont,pamconfControlEnd
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
84 \ skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
85 syn keyword pamconfControlAction contained ignore bad die ok done reset
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
86 \ nextgroup=pamconfControlValues,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
87 \ pamconfControlLineCont,pamconfControlEnd
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
88 \ skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
89
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
90 syn match pamconfControlEnd contained '\]'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
91 \ nextgroup=pamconfMPath,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
92 \ pamconfControlLineContH skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
93
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
94 syn match pamconfControlLineContH contained '\\$'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
95 \ nextgroup=pamconfMPath,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
96 \ pamconfControlLineContH skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
97
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
98 syn match pamconfMPath contained '\S\+'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
99 \ nextgroup=pamconfMPathLineCont,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
100 \ pamconfArgs skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
101
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
102 syn match pamconfArgs contained '\S\+'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
103 \ nextgroup=pamconfArgsLineCont,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
104 \ pamconfArgs skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
105
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
106 syn match pamconfMPathLineCont contained '\\$'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
107 \ nextgroup=pamconfMPathLineCont,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
108 \ pamconfArgs skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
109
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
110 syn match pamconfArgsLineCont contained '\\$'
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
111 \ nextgroup=pamconfArgsLineCont,
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
112 \ pamconfArgs skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
113
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
114 hi def link pamconfTodo Todo
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
115 hi def link pamconfComment Comment
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
116 hi def link pamconfService Statement
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
117 hi def link pamconfServiceLineCont Special
21676
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
118 hi def link pamconfType Special
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
119 hi def link pamconfTypeKeyword Type
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
120 hi def link pamconfTypeLineCont pamconfServiceLineCont
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
121 hi def link pamconfControl Macro
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
122 hi def link pamconfControlBegin Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
123 hi def link pamconfControlLineContH pamconfServiceLineCont
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
124 hi def link pamconfControlLineCont pamconfServiceLineCont
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
125 hi def link pamconfControlValues Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
126 hi def link pamconfControlValueEq Operator
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
127 hi def link pamconfControlActionN Number
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
128 hi def link pamconfControlAction Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
129 hi def link pamconfControlEnd Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
130 hi def link pamconfMPath String
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
131 hi def link pamconfMPathLineCont pamconfServiceLineCont
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
132 hi def link pamconfArgs Normal
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
133 hi def link pamconfArgsLineCont pamconfServiceLineCont
34700
24fb114b2f2c runtime(pamconf): add support for Debian specific @includes
Christian Brabandt <cb@256bit.org>
parents: 21676
diff changeset
134 hi def link pamconfInclude Include
24fb114b2f2c runtime(pamconf): add support for Debian specific @includes
Christian Brabandt <cb@256bit.org>
parents: 21676
diff changeset
135 hi def link pamconfIncludeFile Include
375
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
136
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
137 let b:current_syntax = "pamconf"
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
138
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
139 let &cpo = s:cpo_save
f14cbd913415 updated for version 7.0097
vimboss
parents:
diff changeset
140 unlet s:cpo_save