Mercurial > vim
annotate runtime/syntax/debsources.vim @ 34366:1f5f3d58ed28
Added tag v9.1.0113 for changeset 8303936dbd64eca2d06b4f57b9da7a17e7496e27
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 15 Feb 2024 20:30:06 +0100 |
parents | c6d5af39dc7f |
children | f8951966ef0c |
rev | line source |
---|---|
816 | 1 " Vim syntax file |
1668 | 2 " Language: Debian sources.list |
13231 | 3 " Maintainer: Debian Vim Maintainers |
1668 | 4 " Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> |
33670
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
5 " Last Change: 2023 Oct 11 |
31885 | 6 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debsources.vim |
816 | 7 |
8 " Standard syntax initialization | |
13857 | 9 if exists('b:current_syntax') |
816 | 10 finish |
11 endif | |
12 | |
13 " case sensitive | |
14 syn case match | |
15 | |
16 " A bunch of useful keywords | |
32004 | 17 syn match debsourcesType /\(deb-src\|deb\)/ |
18 syn match debsourcesFreeComponent /\(main\|universe\)/ | |
19 syn match debsourcesNonFreeComponent /\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)/ | |
816 | 20 |
21 " Match comments | |
2034 | 22 syn match debsourcesComment /#.*/ contains=@Spell |
816 | 23 |
33670
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
24 " Include Debian versioning information |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
25 runtime! syntax/shared/debversions.vim |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
26 |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
27 exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+' |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
28 exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|') .'\)\>\([-[:alnum:]_./]*\)+' |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
29 |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
30 unlet g:debSharedSupportedVersions |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
31 unlet g:debSharedUnsupportedVersions |
6823 | 32 |
816 | 33 " Match uri's |
13857 | 34 syn match debsourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+' |
33670
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
35 syn region debsourcesLine start="^" end="$" contains=debsourcesType,debsourcesFreeComponent,debsourcesNonFreeComponent,debsourcesComment,debsourcesUri,debsourcesDistrKeyword,debsourcesUnsupportedDistrKeyword oneline |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
36 |
816 | 37 |
38 " Associate our matches and regions with pretty colours | |
32004 | 39 hi def link debsourcesType Statement |
40 hi def link debsourcesFreeComponent Statement | |
41 hi def link debsourcesNonFreeComponent Statement | |
33670
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
42 hi def link debsourcesComment Comment |
c6d5af39dc7f
runtime(debian): update debian related runtime files (#13423)
Christian Brabandt <cb@256bit.org>
parents:
32004
diff
changeset
|
43 hi def link debsourcesUri Constant |
6823 | 44 hi def link debsourcesDistrKeyword Type |
45 hi def link debsourcesUnsupportedDistrKeyword WarningMsg | |
816 | 46 |
13857 | 47 let b:current_syntax = 'debsources' |