1" Vim syntax file 2" Language: pam(8) configuration file 3" Maintainer: Nikolai Weibull <[email protected]> 4" Latest Revision: 2011-08-03 5 6 7if exists("b:current_syntax") 8 finish 9endif 10 11let s:cpo_save = &cpo 12set cpo&vim 13 14syn match pamconfService '^[[:graph:]]\+' 15 \ nextgroup=pamconfType, 16 \ pamconfServiceLineCont skipwhite 17 18syn keyword pamconfTodo contained TODO FIXME XXX NOTE 19 20syn region pamconfComment display oneline start='#' end='$' 21 \ contains=pamconfTodo,@Spell 22 23syn match pamconfServiceLineCont contained '\\$' 24 \ nextgroup=pamconfType, 25 \ pamconfServiceLineCont skipwhite skipnl 26 27syn keyword pamconfType account auth password session 28 \ nextgroup=pamconfControl, 29 \ pamconfTypeLineCont skipwhite 30 31syn match pamconfTypeLineCont contained '\\$' 32 \ nextgroup=pamconfControl, 33 \ pamconfTypeLineCont skipwhite skipnl 34 35syn keyword pamconfControl contained requisite required sufficient 36 \ optional include substack 37 \ nextgroup=pamconfMPath, 38 \ pamconfControlLineContH skipwhite 39 40syn match pamconfControlBegin '\[' nextgroup=pamconfControlValues, 41 \ pamconfControlLineCont skipwhite 42 43syn match pamconfControlLineCont contained '\\$' 44 \ nextgroup=pamconfControlValues, 45 \ pamconfControlLineCont skipwhite skipnl 46 47syn 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 60syn match pamconfControlValueEq contained '=' 61 \ nextgroup=pamconfControlActionN, 62 \ pamconfControlAction 63 64syn match pamconfControlActionN contained '\d\+\>' 65 \ nextgroup=pamconfControlValues, 66 \ pamconfControlLineCont,pamconfControlEnd 67 \ skipwhite 68syn keyword pamconfControlAction contained ignore bad die ok done reset 69 \ nextgroup=pamconfControlValues, 70 \ pamconfControlLineCont,pamconfControlEnd 71 \ skipwhite 72 73syn match pamconfControlEnd contained '\]' 74 \ nextgroup=pamconfMPath, 75 \ pamconfControlLineContH skipwhite 76 77syn match pamconfControlLineContH contained '\\$' 78 \ nextgroup=pamconfMPath, 79 \ pamconfControlLineContH skipwhite skipnl 80 81syn match pamconfMPath contained '\S\+' 82 \ nextgroup=pamconfMPathLineCont, 83 \ pamconfArgs skipwhite 84 85syn match pamconfArgs contained '\S\+' 86 \ nextgroup=pamconfArgsLineCont, 87 \ pamconfArgs skipwhite 88 89syn match pamconfMPathLineCont contained '\\$' 90 \ nextgroup=pamconfMPathLineCont, 91 \ pamconfArgs skipwhite skipnl 92 93syn match pamconfArgsLineCont contained '\\$' 94 \ nextgroup=pamconfArgsLineCont, 95 \ pamconfArgs skipwhite skipnl 96 97hi def link pamconfTodo Todo 98hi def link pamconfComment Comment 99hi def link pamconfService Statement 100hi def link pamconfServiceLineCont Special 101hi def link pamconfType Type 102hi def link pamconfTypeLineCont pamconfServiceLineCont 103hi def link pamconfControl Macro 104hi def link pamconfControlBegin Delimiter 105hi def link pamconfControlLineContH pamconfServiceLineCont 106hi def link pamconfControlLineCont pamconfServiceLineCont 107hi def link pamconfControlValues Identifier 108hi def link pamconfControlValueEq Operator 109hi def link pamconfControlActionN Number 110hi def link pamconfControlAction Identifier 111hi def link pamconfControlEnd Delimiter 112hi def link pamconfMPath String 113hi def link pamconfMPathLineCont pamconfServiceLineCont 114hi def link pamconfArgs Normal 115hi def link pamconfArgsLineCont pamconfServiceLineCont 116 117let b:current_syntax = "pamconf" 118 119let &cpo = s:cpo_save 120unlet s:cpo_save 121