"Fossies" - the Fresh Open Source Software Archive

Member "vim-8.2.1354/runtime/syntax/debchangelog.vim" (2 Aug 2020, 3413 Bytes) of package /linux/misc/vim-8.2.1354.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) vimscript source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 " Vim syntax file
    2 " Language:    Debian changelog files
    3 " Maintainer:  Debian Vim Maintainers
    4 " Former Maintainers: Gerfried Fuchs <alfie@ist.org>
    5 "                     Wichert Akkerman <wakkerma@debian.org>
    6 " Last Change: 2020 Apr 27
    7 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
    8 
    9 " Standard syntax initialization
   10 if exists('b:current_syntax')
   11   finish
   12 endif
   13 
   14 " Case doesn't matter for us
   15 syn case ignore
   16 
   17 let s:urgency='urgency=\(low\|medium\|high\|emergency\|critical\)\( [^[:space:],][^,]*\)\='
   18 let s:binNMU='binary-only=yes'
   19 
   20 let s:cpo = &cpo
   21 set cpo-=C
   22 let s:supported = [
   23       \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
   24       \ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
   25       \ 'sid', 'rc-buggy',
   26       \
   27       \ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'groovy', 'devel'
   28       \ ]
   29 let s:unsupported = [
   30       \ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
   31       \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze',
   32       \
   33       \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
   34       \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
   35       \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
   36       \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
   37       \ 'disco'
   38       \ ]
   39 let &cpo=s:cpo
   40 
   41 " Define some common expressions we can use later on
   42 syn match debchangelogName  contained "^[[:alnum:]][[:alnum:].+-]\+ "
   43 exe 'syn match debchangelogFirstKV  contained "; \('.s:urgency.'\|'.s:binNMU.'\)"'
   44 exe 'syn match debchangelogOtherKV  contained ", \('.s:urgency.'\|'.s:binNMU.'\)"'
   45 exe 'syn match debchangelogTarget   contained "\%( \%('.join(s:supported, '\|').'\)\>[-[:alnum:]]*\)\+"'
   46 exe 'syn match debchangelogUnsupportedTarget    contained "\%( \%('.join(s:unsupported, '\|').'\)\>[-[:alnum:]]*\)\+"'
   47 syn match debchangelogUnreleased    contained / UNRELEASED/
   48 syn match debchangelogVersion   contained "(.\{-})"
   49 syn match debchangelogCloses    contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
   50 syn match debchangelogLP    contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
   51 syn match debchangelogEmail contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+"
   52 syn match debchangelogEmail contained "<.\{-}>"
   53 
   54 " Define the entries that make up the changelog
   55 syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogFirstKV,debchangelogOtherKV,debchangelogTarget,debchangelogUnsupportedTarget,debchangelogUnreleased,debchangelogVersion,debchangelogBinNMU oneline
   56 syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline
   57 syn region debchangelogEntry start="^  " end="$" contains=debchangelogCloses,debchangelogLP oneline
   58 
   59 " Associate our matches and regions with pretty colours
   60 hi def link debchangelogHeader  Error
   61 hi def link debchangelogFooter  Identifier
   62 hi def link debchangelogEntry   Normal
   63 hi def link debchangelogCloses  Statement
   64 hi def link debchangelogLP      Statement
   65 hi def link debchangelogFirstKV Identifier
   66 hi def link debchangelogOtherKV Identifier
   67 hi def link debchangelogName    Comment
   68 hi def link debchangelogVersion Identifier
   69 hi def link debchangelogTarget  Identifier
   70 hi def link debchangelogUnsupportedTarget  Identifier
   71 hi def link debchangelogUnreleased WarningMsg
   72 hi def link debchangelogEmail   Special
   73 
   74 let b:current_syntax = 'debchangelog'
   75 
   76 " vim: ts=8 sw=2