annotate runtime/syntax/udevrules.vim @ 31602:53c3df37a2b0 v9.0.1133

patch 9.0.1133: error message names do not match the items Commit: https://github.com/vim/vim/commit/a9fa8c58fbcc5cf8850f6963c509de272f4d4bbf Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 2 18:10:04 2023 +0000 patch 9.0.1133: error message names do not match the items Problem: Error message names do not match the items. Solution: Add "_str" when the text contains "%s".
author Bram Moolenaar <Bram@vim.org>
date Mon, 02 Jan 2023 19:15:04 +0100
parents 1218c5353e2b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
1 " Vim syntax file
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 1213
diff changeset
2 " Language: udev(8) rules file
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 1213
diff changeset
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 1213
diff changeset
4 " Latest Revision: 2006-12-18
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
5
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
6 if exists("b:current_syntax")
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
7 finish
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
8 endif
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
9
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
10 let s:cpo_save = &cpo
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
11 set cpo&vim
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
12
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
13 " TODO: Line continuations.
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
14
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
15 syn keyword udevrulesTodo contained TODO FIXME XXX NOTE
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
16
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
17 syn region udevrulesComment display oneline start='^\s*#' end='$'
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
18 \ contains=udevrulesTodo,@Spell
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
19
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
20 syn keyword udevrulesRuleKey ACTION DEVPATH KERNEL SUBSYSTEM KERNELS
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
21 \ SUBSYSTEMS DRIVERS RESULT
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
22 \ nextgroup=udevrulesRuleTest
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
23 \ skipwhite
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
24
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
25 syn keyword udevrulesRuleKey ATTRS nextgroup=udevrulesAttrsPath
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
26
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
27 syn region udevrulesAttrsPath display transparent
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
28 \ matchgroup=udevrulesDelimiter start='{'
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
29 \ matchgroup=udevrulesDelimiter end='}'
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
30 \ contains=udevrulesPath
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
31 \ nextgroup=udevrulesRuleTest
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
32 \ skipwhite
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
33
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
34 syn keyword udevrulesRuleKey ENV nextgroup=udevrulesEnvVar
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
35
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
36 syn region udevrulesEnvVar display transparent
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
37 \ matchgroup=udevrulesDelimiter start='{'
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
38 \ matchgroup=udevrulesDelimiter end='}'
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
39 \ contains=udevrulesVariable
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
40 \ nextgroup=udevrulesRuleTest,udevrulesRuleEq
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
41 \ skipwhite
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
42
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
43 syn keyword udevrulesRuleKey PROGRAM RESULT
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
44 \ nextgroup=udevrulesEStringTest,udevrulesEStringEq
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
45 \ skipwhite
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
46
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
47 syn keyword udevrulesAssignKey NAME SYMLINK OWNER GROUP RUN
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
48 \ nextgroup=udevrulesEStringEq
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
49 \ skipwhite
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
50
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
51 syn keyword udevrulesAssignKey MODE LABEL GOTO WAIT_FOR_SYSFS
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
52 \ nextgroup=udevrulesRuleEq
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
53 \ skipwhite
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
54
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
55 syn keyword udevrulesAssignKey ATTR nextgroup=udevrulesAttrsPath
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
56
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
57 syn region udevrulesAttrKey display transparent
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
58 \ matchgroup=udevrulesDelimiter start='{'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
59 \ matchgroup=udevrulesDelimiter end='}'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
60 \ contains=udevrulesKey
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
61 \ nextgroup=udevrulesRuleEq
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
62 \ skipwhite
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
63
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
64 syn keyword udevrulesAssignKey IMPORT nextgroup=udevrulesImport,
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
65 \ udevrulesEStringEq
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
66 \ skipwhite
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
67
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
68 syn region udevrulesImport display transparent
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
69 \ matchgroup=udevrulesDelimiter start='{'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
70 \ matchgroup=udevrulesDelimiter end='}'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
71 \ contains=udevrulesImportType
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
72 \ nextgroup=udevrulesEStringEq
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
73 \ skipwhite
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
74
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
75 syn keyword udevrulesImportType program file parent
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
76
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
77 syn keyword udevrulesAssignKey OPTIONS
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
78 \ nextgroup=udevrulesOptionsEq
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
79
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
80 syn match udevrulesPath contained display '[^}]\+'
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
81
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
82 syn match udevrulesVariable contained display '[^}]\+'
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
83
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
84 syn match udevrulesRuleTest contained display '[=!:]='
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
85 \ nextgroup=udevrulesString skipwhite
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
86
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
87 syn match udevrulesEStringTest contained display '[=!+:]='
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
88 \ nextgroup=udevrulesEString skipwhite
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
89
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
90 syn match udevrulesRuleEq contained display '+=\|=\ze[^=]'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
91 \ nextgroup=udevrulesString skipwhite
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
92
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
93 syn match udevrulesEStringEq contained '+=\|=\ze[^=]'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
94 \ nextgroup=udevrulesEString skipwhite
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
95
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
96 syn match udevrulesOptionsEq contained '+=\|=\ze[^=]'
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
97 \ nextgroup=udevrulesOptions skipwhite
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
98
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
99 syn region udevrulesEString contained display oneline start=+"+ end=+"+
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
100 \ contains=udevrulesStrEscapes,udevrulesStrVars
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
101
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
102 syn match udevrulesStrEscapes contained '%[knpbMmcPrN%]'
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
103
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
104 " TODO: This can actually stand alone (without {…}), so add a nextgroup here.
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
105 syn region udevrulesStrEscapes contained start='%c{' end='}'
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
106 \ contains=udevrulesStrNumber
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
107
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
108 syn region udevrulesStrEscapes contained start='%s{' end='}'
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
109 \ contains=udevrulesPath
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
110
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
111 syn region udevrulesStrEscapes contained start='%E{' end='}'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
112 \ contains=udevrulesVariable
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
113
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
114 syn match udevrulesStrNumber contained '\d\++\='
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
115
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
116 syn match udevrulesStrVars contained display '$\%(kernel\|number\|devpath\|id\|major\|minor\|result\|parent\|root\|tempnode\)\>'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
117
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
118 syn region udevrulesStrVars contained start='$attr{' end='}'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
119 \ contains=udevrulesPath
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
120
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
121 syn region udevrulesStrVars contained start='$env{' end='}'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
122 \ contains=udevrulesVariable
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
123
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
124 syn match udevrulesStrVars contained display '\$\$'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
125
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
126 syn region udevrulesString contained display oneline start=+"+ end=+"+
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
127 \ contains=udevrulesPattern
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
128
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
129 syn match udevrulesPattern contained '[*?]'
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
130 syn region udevrulesPattern contained start='\[!\=' end='\]'
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
131 \ contains=udevrulesPatRange
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
132
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
133 syn match udevrulesPatRange contained '[^[-]-[^]-]'
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
134
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
135 syn region udevrulesOptions contained display oneline start=+"+ end=+"+
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
136 \ contains=udevrulesOption,udevrulesOptionSep
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
137
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
138 syn keyword udevrulesOption contained last_rule ignore_device ignore_remove
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
139 \ all_partitions
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
140
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
141 syn match udevrulesOptionSep contained ','
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
142
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
143 hi def link udevrulesTodo Todo
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
144 hi def link udevrulesComment Comment
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
145 hi def link udevrulesRuleKey Keyword
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
146 hi def link udevrulesDelimiter Delimiter
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
147 hi def link udevrulesAssignKey Identifier
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
148 hi def link udevrulesPath Identifier
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
149 hi def link udevrulesVariable Identifier
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
150 hi def link udevrulesAttrKey Identifier
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
151 " XXX: setting this to Operator makes for extremely intense highlighting.
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
152 hi def link udevrulesEq Normal
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
153 hi def link udevrulesRuleEq udevrulesEq
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
154 hi def link udevrulesEStringEq udevrulesEq
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
155 hi def link udevrulesOptionsEq udevrulesEq
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
156 hi def link udevrulesEString udevrulesString
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
157 hi def link udevrulesStrEscapes SpecialChar
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
158 hi def link udevrulesStrNumber Number
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
159 hi def link udevrulesStrVars Identifier
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
160 hi def link udevrulesString String
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
161 hi def link udevrulesPattern SpecialChar
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
162 hi def link udevrulesPatRange SpecialChar
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
163 hi def link udevrulesOptions udevrulesString
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
164 hi def link udevrulesOption Type
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
165 hi def link udevrulesOptionSep Delimiter
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
166 hi def link udevrulesImportType Type
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
167
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
168 let b:current_syntax = "udevrules"
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
169
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
170 let &cpo = s:cpo_save
4fe8e1a7758e updated for version 7.0102
vimboss
parents:
diff changeset
171 unlet s:cpo_save