Mercurial > vim
annotate runtime/syntax/deb822sources.vim @ 34590:4cad34137ea0
runtime(vim): Update base-syntax, disallow '.' at start of menu item names (#14232)
Commit: https://github.com/vim/vim/commit/ec21bafc135a1e78d40e4fc9118e022bbab958e8
Author: dkearns <dougkearns@gmail.com>
Date: Wed Mar 20 04:04:42 2024 +1100
runtime(vim): Update base-syntax, disallow '.' at start of menu item names (https://github.com/vim/vim/issues/14232)
Disallow '.' at the start of a menu item name.
This is the menu path separator character and should be escaped with a
'\' in this case.
Partially fixes #14230. "popup" is still incorrectly matched as the Ex
command.
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 19 Mar 2024 18:15:05 +0100 |
parents | f8951966ef0c |
children | 15d2d82ff285 |
rev | line source |
---|---|
33670
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Vim syntax file |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " Language: Debian deb822-format source list file |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 " Maintainer: Debian Vim Maintainers |
34438
f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Christian Brabandt <cb@256bit.org>
parents:
33670
diff
changeset
|
4 " Last Change: 2024 Jan 30 |
33670
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/deb822sources.vim |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 " Standard syntax initialization |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 if exists('b:current_syntax') |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 finish |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 endif |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 " case insensitive |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 syn case ignore |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 |
34438
f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Christian Brabandt <cb@256bit.org>
parents:
33670
diff
changeset
|
15 " A bunch of useful keywords |
f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Christian Brabandt <cb@256bit.org>
parents:
33670
diff
changeset
|
16 syn match deb822sourcesType /\<\(deb-src\|deb\)\ */ contained |
f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Christian Brabandt <cb@256bit.org>
parents:
33670
diff
changeset
|
17 syn match deb822sourcesFreeComponent /\<\(main\|universe\)\> */ contained |
f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Christian Brabandt <cb@256bit.org>
parents:
33670
diff
changeset
|
18 syn match deb822sourcesNonFreeComponent /\<\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)\> */ contained |
f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Christian Brabandt <cb@256bit.org>
parents:
33670
diff
changeset
|
19 |
33670
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 " Comments are matched from the first character of a line to the end-of-line |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 syn region deb822sourcesComment start="^#" end="$" |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 " Include Debian versioning information |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 runtime! syntax/shared/debversions.vim |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 |
34438
f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Christian Brabandt <cb@256bit.org>
parents:
33670
diff
changeset
|
26 exe 'syn match deb822sourcesSupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\) *+' |
f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Christian Brabandt <cb@256bit.org>
parents:
33670
diff
changeset
|
27 exe 'syn match deb822sourcesUnsupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\) *+' |
33670
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 unlet g:debSharedSupportedVersions |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 unlet g:debSharedUnsupportedVersions |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 syn region deb822sourcesSuites start="\(^Suites: *\)\@<=" end="$" contains=deb822sourcesSupportedSuites,deb822sourcesUnsupportedSuites oneline |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 syn keyword deb822sourcesForce contained force |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 syn keyword deb822sourcesYesNo contained yes no |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 " Match uri's |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 syn match deb822sourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+' |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 |
34438
f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Christian Brabandt <cb@256bit.org>
parents:
33670
diff
changeset
|
40 syn region deb822sourcesStrictField matchgroup=deb822sourcesEntryField start="^\%(Types\|URIs\|Suites\|Components\): *" end="$" contains=deb822sourcesType,deb822sourcesUri,deb822sourcesSupportedSuites,deb822sourcesUnsupportedSuites,deb822sourcesFreeComponent,deb822sourcesNonFreeComponent oneline |
f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Christian Brabandt <cb@256bit.org>
parents:
33670
diff
changeset
|
41 syn region deb822sourcesField matchgroup=deb822sourcesOptionField start="^\%(Signed-By\|Check-Valid-Until\|Valid-Until-Min\|Valid-Until-Max\|Date-Max-Future\|InRelease-Path\): *" end="$" oneline |
f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Christian Brabandt <cb@256bit.org>
parents:
33670
diff
changeset
|
42 syn region deb822sourcesField matchgroup=deb822sourcesMultiValueOptionField start="^\%(Architectures\|Languages\|Targets\)\%(-Add\|-Remove\)\?: *" end="$" oneline |
33670
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 syn region deb822sourcesStrictField matchgroup=deb822sourcesBooleanOptionField start="^\%(PDiffs\|Allow-Insecure\|Allow-Weak\|Allow-Downgrade-To-Insecure\|Trusted\|Check-Date\): *" end="$" contains=deb822sourcesYesNo oneline |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 syn region deb822sourcesStrictField matchgroup=deb822sourcesForceBooleanOptionField start="^\%(By-Hash\): *" end="$" contains=deb822sourcesForce,deb822sourcesYesNo oneline |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 |
34438
f8951966ef0c
runtime(debian): update Debian syntax files (#14098)
Christian Brabandt <cb@256bit.org>
parents:
33670
diff
changeset
|
46 hi def link deb822sourcesField Default |
33670
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 hi def link deb822sourcesComment Comment |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 hi def link deb822sourcesEntryField Keyword |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 hi def link deb822sourcesOptionField Special |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 hi def link deb822sourcesMultiValueOptionField Special |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 hi def link deb822sourcesBooleanOptionField Special |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 hi def link deb822sourcesForceBooleanOptionField Special |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 hi def link deb822sourcesStrictField Error |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 hi def link deb822sourcesType Identifier |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 hi def link deb822sourcesFreeComponent Identifier |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
56 hi def link deb822sourcesNonFreeComponent Identifier |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 hi def link deb822sourcesForce Identifier |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 hi def link deb822sourcesYesNo Identifier |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 hi def link deb822sourcesUri Constant |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 hi def link deb822sourcesSupportedSuites Type |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 hi def link deb822sourcesUnsupportedSuites WarningMsg |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 let b:current_syntax = 'deb822sources' |