Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
debsources.vim47 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:     Debian sources.list3" Maintainer:   Debian Vim Maintainers4" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>5" Last Change: 2024 Jan 306" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debsources.vim7 8" Standard syntax initialization9if exists('b:current_syntax')10  finish11endif12 13" case sensitive14syn case match15 16" A bunch of useful keywords17syn match debsourcesType               /\<\(deb-src\|deb\)\>/ contained18syn match debsourcesFreeComponent      /\<\(main\|universe\)\>/ contained19syn match debsourcesNonFreeComponent   /\<\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)\>/ contained20 21" Match comments22syn match debsourcesComment        /#.*/  contains=@Spell23 24" Include Debian versioning information25runtime! syntax/shared/debversions.vim26 27exe 'syn match debsourcesDistrKeyword   +\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+'28exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|') .'\)\>\([-[:alnum:]_./]*\)+'29 30unlet g:debSharedSupportedVersions31unlet g:debSharedUnsupportedVersions32 33" Match uri's34syn match debsourcesUri            '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' 	<>"]\+'35syn region debsourcesLine start="^" end="$" contains=debsourcesType,debsourcesFreeComponent,debsourcesNonFreeComponent,debsourcesComment,debsourcesUri,debsourcesDistrKeyword,debsourcesUnsupportedDistrKeyword oneline36 37" Associate our matches and regions with pretty colours38hi def link debsourcesType                    Statement39hi def link debsourcesFreeComponent           Statement40hi def link debsourcesNonFreeComponent        Statement41hi def link debsourcesComment                 Comment42hi def link debsourcesUri                     Constant43hi def link debsourcesDistrKeyword            Type44hi def link debsourcesUnsupportedDistrKeyword WarningMsg45 46let b:current_syntax = 'debsources'47 
codekingpro/portable-devtools · Team Ai