2014-07-10 21:05:51 -07:00
|
|
|
" Vim syntax file
|
|
|
|
" Language: Debian sources.list
|
2018-10-28 06:05:39 -07:00
|
|
|
" Maintainer: Debian Vim Maintainers
|
2014-07-10 21:05:51 -07:00
|
|
|
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
2022-05-13 06:20:58 -07:00
|
|
|
" Last Change: 2022 May 01
|
2018-10-28 06:05:39 -07:00
|
|
|
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
" Standard syntax initialization
|
2018-10-29 00:43:13 -07:00
|
|
|
if exists('b:current_syntax')
|
2014-07-10 21:05:51 -07:00
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
|
|
|
" case sensitive
|
|
|
|
syn case match
|
|
|
|
|
|
|
|
" A bunch of useful keywords
|
|
|
|
syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|restricted\|universe\|multiverse\)/
|
|
|
|
|
|
|
|
" Match comments
|
|
|
|
syn match debsourcesComment /#.*/ contains=@Spell
|
|
|
|
|
2015-11-07 19:35:37 -07:00
|
|
|
let s:cpo = &cpo
|
|
|
|
set cpo-=C
|
|
|
|
let s:supported = [
|
|
|
|
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
|
2021-05-01 14:50:17 -07:00
|
|
|
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
|
2021-05-01 16:15:16 -07:00
|
|
|
\ 'trixie', 'sid', 'rc-buggy',
|
2015-11-07 19:35:37 -07:00
|
|
|
\
|
2022-05-13 06:20:58 -07:00
|
|
|
\ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy', 'kinetic',
|
2021-10-23 13:29:17 -07:00
|
|
|
\ 'devel'
|
2015-11-07 19:35:37 -07:00
|
|
|
\ ]
|
|
|
|
let s:unsupported = [
|
|
|
|
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
2021-05-01 14:50:17 -07:00
|
|
|
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
|
2015-11-07 19:35:37 -07:00
|
|
|
\
|
|
|
|
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
|
|
|
|
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
|
2017-11-06 17:34:28 -07:00
|
|
|
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
|
2021-04-26 18:25:27 -07:00
|
|
|
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
|
2022-03-30 04:12:12 -07:00
|
|
|
\ 'disco', 'eoan', 'hirsute', 'groovy'
|
2015-11-07 19:35:37 -07:00
|
|
|
\ ]
|
|
|
|
let &cpo=s:cpo
|
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
" Match uri's
|
2018-10-29 00:43:13 -07:00
|
|
|
syn match debsourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+'
|
2017-11-06 17:34:28 -07:00
|
|
|
exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:supported, '\|'). '\)\>\([-[:alnum:]_./]*\)+'
|
|
|
|
exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:unsupported, '\|') .'\)\>\([-[:alnum:]_./]*\)+'
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
" Associate our matches and regions with pretty colours
|
2015-11-07 19:35:37 -07:00
|
|
|
hi def link debsourcesLine Error
|
|
|
|
hi def link debsourcesKeyword Statement
|
|
|
|
hi def link debsourcesDistrKeyword Type
|
|
|
|
hi def link debsourcesUnsupportedDistrKeyword WarningMsg
|
|
|
|
hi def link debsourcesComment Comment
|
|
|
|
hi def link debsourcesUri Constant
|
2014-07-10 21:05:51 -07:00
|
|
|
|
2018-10-29 00:43:13 -07:00
|
|
|
let b:current_syntax = 'debsources'
|