Merge branch 'vim-runtime'
[vim_mainline.git] / runtime / syntax / loginaccess.vim
blob07d60eeca0347e04e39286df84e4575396be58a8
1 " Vim syntax file
2 " Language:         login.access(5) configuration file
3 " Maintainer:       Nikolai Weibull <now@bitwi.se>
4 " Latest Revision:  2006-04-19
6 if exists("b:current_syntax")
7   finish
8 endif
10 let s:cpo_save = &cpo
11 set cpo&vim
13 syn keyword loginaccessTodo           contained TODO FIXME XXX NOTE
15 syn region  loginaccessComment        display oneline start='^#' end='$'
16                                       \ contains=loginaccessTodo,@Spell
18 syn match   loginaccessBegin          display '^'
19                                       \ nextgroup=loginaccessPermission,
20                                       \ loginaccessComment skipwhite
22 syn match   loginaccessPermission     contained display '[^#]'
23                                       \ contains=loginaccessPermError
24                                       \ nextgroup=loginaccessUserSep
26 syn match   loginaccessPermError      contained display '[^+-]'
28 syn match   loginaccessUserSep        contained display ':'
29                                       \ nextgroup=loginaccessUsers,
30                                       \ loginaccessAllUsers,
31                                       \ loginaccessExceptUsers
33 syn match   loginaccessUsers          contained display '[^, \t:]\+'
34                                       \ nextgroup=loginaccessUserIntSep,
35                                       \ loginaccessOriginSep
37 syn match   loginaccessAllUsers       contained display '\<ALL\>'
38                                       \ nextgroup=loginaccessUserIntSep,
39                                       \ loginaccessOriginSep
41 syn match   loginaccessLocalUsers     contained display '\<LOCAL\>'
42                                       \ nextgroup=loginaccessUserIntSep,
43                                       \ loginaccessOriginSep
45 syn match   loginaccessExceptUsers    contained display '\<EXCEPT\>'
46                                       \ nextgroup=loginaccessUserIntSep,
47                                       \ loginaccessOriginSep
49 syn match   loginaccessUserIntSep     contained display '[, \t]'
50                                       \ nextgroup=loginaccessUsers,
51                                       \ loginaccessAllUsers,
52                                       \ loginaccessExceptUsers
54 syn match   loginaccessOriginSep      contained display ':'
55                                       \ nextgroup=loginaccessOrigins,
56                                       \ loginaccessAllOrigins,
57                                       \ loginaccessExceptOrigins
59 syn match   loginaccessOrigins        contained display '[^, \t]\+'
60                                       \ nextgroup=loginaccessOriginIntSep
62 syn match   loginaccessAllOrigins     contained display '\<ALL\>'
63                                       \ nextgroup=loginaccessOriginIntSep
65 syn match   loginaccessLocalOrigins   contained display '\<LOCAL\>'
66                                       \ nextgroup=loginaccessOriginIntSep
68 syn match   loginaccessExceptOrigins  contained display '\<EXCEPT\>'
69                                       \ nextgroup=loginaccessOriginIntSep
71 syn match   loginaccessOriginIntSep   contained display '[, \t]'
72                                       \ nextgroup=loginaccessOrigins,
73                                       \ loginaccessAllOrigins,
74                                       \ loginaccessExceptOrigins
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
93 let b:current_syntax = "loginaccess"
95 let &cpo = s:cpo_save
96 unlet s:cpo_save