389
|
1 " Vim syntax file
|
11062
|
2 " Language: udev(8) permissions file
|
|
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
|
4 " Latest Revision: 2006-04-19
|
389
|
5
|
|
6 if exists("b:current_syntax")
|
|
7 finish
|
|
8 endif
|
|
9
|
|
10 let s:cpo_save = &cpo
|
|
11 set cpo&vim
|
|
12
|
|
13 syn match udevpermBegin display '^' nextgroup=udevpermDevice
|
|
14
|
|
15 syn match udevpermDevice contained display '[^:]\+'
|
|
16 \ contains=udevpermPattern
|
|
17 \ nextgroup=udevpermUserColon
|
|
18
|
|
19 syn match udevpermPattern contained '[*?]'
|
|
20 syn region udevpermPattern contained start='\[!\=' end='\]'
|
|
21 \ contains=udevpermPatRange
|
|
22
|
|
23 syn match udevpermPatRange contained '[^[-]-[^]-]'
|
|
24
|
|
25 syn match udevpermUserColon contained display ':'
|
|
26 \ nextgroup=udevpermUser
|
|
27
|
|
28 syn match udevpermUser contained display '[^:]\+'
|
|
29 \ nextgroup=udevpermGroupColon
|
|
30
|
|
31 syn match udevpermGroupColon contained display ':'
|
|
32 \ nextgroup=udevpermGroup
|
|
33
|
|
34 syn match udevpermGroup contained display '[^:]\+'
|
|
35 \ nextgroup=udevpermPermColon
|
|
36
|
|
37 syn match udevpermPermColon contained display ':'
|
|
38 \ nextgroup=udevpermPerm
|
|
39
|
|
40 syn match udevpermPerm contained display '\<0\=\o\+\>'
|
|
41 \ contains=udevpermOctalZero
|
|
42
|
|
43 syn match udevpermOctalZero contained display '\<0'
|
|
44 syn match udevpermOctalError contained display '\<0\o*[89]\d*\>'
|
|
45
|
|
46 syn keyword udevpermTodo contained TODO FIXME XXX NOTE
|
|
47
|
|
48 syn region udevpermComment display oneline start='^\s*#' end='$'
|
|
49 \ contains=udevpermTodo,@Spell
|
|
50
|
|
51 hi def link udevpermTodo Todo
|
|
52 hi def link udevpermComment Comment
|
|
53 hi def link udevpermDevice String
|
|
54 hi def link udevpermPattern SpecialChar
|
|
55 hi def link udevpermPatRange udevpermPattern
|
|
56 hi def link udevpermColon Normal
|
|
57 hi def link udevpermUserColon udevpermColon
|
|
58 hi def link udevpermUser Identifier
|
|
59 hi def link udevpermGroupColon udevpermColon
|
|
60 hi def link udevpermGroup Type
|
|
61 hi def link udevpermPermColon udevpermColon
|
|
62 hi def link udevpermPerm Number
|
|
63 hi def link udevpermOctalZero PreProc
|
|
64 hi def link udevpermOctalError Error
|
|
65
|
|
66 let b:current_syntax = "udevperm"
|
|
67
|
|
68 let &cpo = s:cpo_save
|
|
69 unlet s:cpo_save
|