Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
debchangelog.vim63 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:    Debian changelog files3" Maintainer:  Debian Vim Maintainers4" Former Maintainers: Gerfried Fuchs <alfie@ist.org>5"                     Wichert Akkerman <wakkerma@debian.org>6" Last Change: 2023 Oct 117" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debchangelog.vim8 9" Standard syntax initialization10if exists('b:current_syntax')11  finish12endif13 14" Case doesn't matter for us15syn case ignore16 17let s:urgency='urgency=\(low\|medium\|high\|emergency\|critical\)\( [^[:space:],][^,]*\)\='18let s:binNMU='binary-only=yes'19 20" Include Debian versioning information21runtime! syntax/shared/debversions.vim22 23exe 'syn match debchangelogTarget	contained "\%( \%('.join(g:debSharedSupportedVersions, '\|').'\)\>[-[:alnum:]]*\)\+"'24exe 'syn match debchangelogUnsupportedTarget	contained "\%( \%('.join(g:debSharedUnsupportedVersions, '\|').'\)\>[-[:alnum:]]*\)\+"'25 26unlet g:debSharedSupportedVersions27unlet g:debSharedUnsupportedVersions28 29" Define some common expressions we can use later on30syn match debchangelogName	contained "^[[:alnum:]][[:alnum:].+-]\+ "31exe 'syn match debchangelogFirstKV	contained "; \('.s:urgency.'\|'.s:binNMU.'\)"'32exe 'syn match debchangelogOtherKV	contained ", \('.s:urgency.'\|'.s:binNMU.'\)"'33syn match debchangelogUnreleased	contained / UNRELEASED/34syn match debchangelogVersion	contained "(.\{-})"35syn match debchangelogCloses	contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"36syn match debchangelogLP	contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"37syn match debchangelogEmail	contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+"38syn match debchangelogEmail	contained "<.\{-}>"39 40" Define the entries that make up the changelog41syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogFirstKV,debchangelogOtherKV,debchangelogTarget,debchangelogUnsupportedTarget,debchangelogUnreleased,debchangelogVersion,debchangelogBinNMU oneline42syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline43syn region debchangelogEntry start="^  " end="$" contains=debchangelogCloses,debchangelogLP oneline44 45" Associate our matches and regions with pretty colours46hi def link debchangelogHeader     Error47hi def link debchangelogFooter     Identifier48hi def link debchangelogEntry      Normal49hi def link debchangelogCloses     Statement50hi def link debchangelogLP         Statement51hi def link debchangelogFirstKV    Identifier52hi def link debchangelogOtherKV    Identifier53hi def link debchangelogName       Comment54hi def link debchangelogVersion    Identifier55hi def link debchangelogUnreleased WarningMsg56hi def link debchangelogEmail      Special57hi def link debchangelogTarget     Identifier58hi def link debchangelogUnsupportedTarget Identifier59 60let b:current_syntax = 'debchangelog'61 62" vim: ts=8 sw=263 
codekingpro/portable-devtools · Team Ai