codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: Debian deb822-format source list file3" Maintainer: Debian Vim Maintainers4" Last Change: 2024 Jan 305" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/deb822sources.vim6 7" Standard syntax initialization8if exists('b:current_syntax')9 finish10endif11 12" case insensitive13syn case ignore14 15" A bunch of useful keywords16syn match deb822sourcesType /\<\(deb-src\|deb\)\ */ contained17syn match deb822sourcesFreeComponent /\<\(main\|universe\)\> */ contained18syn match deb822sourcesNonFreeComponent /\<\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)\> */ contained19 20" Comments are matched from the first character of a line to the end-of-line21syn region deb822sourcesComment start="^#" end="$"22 23" Include Debian versioning information24runtime! syntax/shared/debversions.vim25 26exe 'syn match deb822sourcesSupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\) *+'27exe 'syn match deb822sourcesUnsupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\) *+'28 29unlet g:debSharedSupportedVersions30unlet g:debSharedUnsupportedVersions31 32syn region deb822sourcesSuites start="\(^Suites: *\)\@<=" end="$" contains=deb822sourcesSupportedSuites,deb822sourcesUnsupportedSuites oneline33 34syn keyword deb822sourcesForce contained force35syn keyword deb822sourcesYesNo contained yes no36 37" Match uri's38syn match deb822sourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+'39 40syn region deb822sourcesStrictField matchgroup=deb822sourcesEntryField start="^\%(Types\|URIs\|Suites\|Components\): *" end="$" contains=deb822sourcesType,deb822sourcesUri,deb822sourcesSupportedSuites,deb822sourcesUnsupportedSuites,deb822sourcesFreeComponent,deb822sourcesNonFreeComponent oneline41syn region deb822sourcesField matchgroup=deb822sourcesOptionField start="^\%(Signed-By\|Check-Valid-Until\|Valid-Until-Min\|Valid-Until-Max\|Date-Max-Future\|InRelease-Path\): *" end="$" oneline42syn region deb822sourcesField matchgroup=deb822sourcesMultiValueOptionField start="^\%(Architectures\|Languages\|Targets\)\%(-Add\|-Remove\)\?: *" end="$" oneline43syn region deb822sourcesStrictField matchgroup=deb822sourcesBooleanOptionField start="^\%(PDiffs\|Allow-Insecure\|Allow-Weak\|Allow-Downgrade-To-Insecure\|Trusted\|Check-Date\|Enabled\): *" end="$" contains=deb822sourcesYesNo oneline44syn region deb822sourcesStrictField matchgroup=deb822sourcesForceBooleanOptionField start="^\%(By-Hash\): *" end="$" contains=deb822sourcesForce,deb822sourcesYesNo oneline45 46hi def link deb822sourcesField Default47hi def link deb822sourcesComment Comment48hi def link deb822sourcesEntryField Keyword49hi def link deb822sourcesOptionField Special50hi def link deb822sourcesMultiValueOptionField Special51hi def link deb822sourcesBooleanOptionField Special52hi def link deb822sourcesForceBooleanOptionField Special53hi def link deb822sourcesStrictField Error54hi def link deb822sourcesType Identifier55hi def link deb822sourcesFreeComponent Identifier56hi def link deb822sourcesNonFreeComponent Identifier57hi def link deb822sourcesForce Identifier58hi def link deb822sourcesYesNo Identifier59hi def link deb822sourcesUri Constant60hi def link deb822sourcesSupportedSuites Type61hi def link deb822sourcesUnsupportedSuites WarningMsg62 63let b:current_syntax = 'deb822sources'64 