blob: d35e24729db0652809e16d1ac6dbf03c27322826 [file] [log] [blame]
Bram Moolenaard2cec5b2006-03-28 21:08:56 +00001" Vim syntax file
Bram Moolenaarc236c162008-07-13 17:41:49 +00002" Language: Debian sources.list
3" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
4" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
Bram Moolenaar06d2d382016-05-20 17:24:11 +02005" Last Change: 2016 Apr 24
Bram Moolenaar256972a2015-12-29 19:10:25 +01006" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim
Bram Moolenaard2cec5b2006-03-28 21:08:56 +00007
8" Standard syntax initialization
9if version < 600
10 syntax clear
11elseif exists("b:current_syntax")
12 finish
13endif
14
15" case sensitive
16syn case match
17
18" A bunch of useful keywords
Bram Moolenaarc236c162008-07-13 17:41:49 +000019syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|restricted\|universe\|multiverse\)/
Bram Moolenaard2cec5b2006-03-28 21:08:56 +000020
21" Match comments
Bram Moolenaar5c736222010-01-06 20:54:52 +010022syn match debsourcesComment /#.*/ contains=@Spell
Bram Moolenaard2cec5b2006-03-28 21:08:56 +000023
Bram Moolenaarf2571c62015-06-09 19:44:55 +020024let s:cpo = &cpo
25set cpo-=C
26let s:supported = [
27 \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
28 \ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
29 \
Bram Moolenaar06d2d382016-05-20 17:24:11 +020030 \ 'precise', 'trusty', 'wily', 'xenial', 'yakkety', 'devel'
Bram Moolenaarf2571c62015-06-09 19:44:55 +020031 \ ]
32let s:unsupported = [
33 \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
34 \ 'woody', 'sarge', 'etch', 'lenny',
35 \
36 \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
37 \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
Bram Moolenaar256972a2015-12-29 19:10:25 +010038 \ 'maverick', 'natty', 'oneiric', 'quantal', 'raring', 'saucy',
Bram Moolenaar06d2d382016-05-20 17:24:11 +020039 \ 'utopic', 'vivid'
Bram Moolenaarf2571c62015-06-09 19:44:55 +020040 \ ]
41let &cpo=s:cpo
42
Bram Moolenaard2cec5b2006-03-28 21:08:56 +000043" Match uri's
Bram Moolenaarc236c162008-07-13 17:41:49 +000044syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
Bram Moolenaarf2571c62015-06-09 19:44:55 +020045exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:supported, '\|'). '\)\([-[:alnum:]_./]*\)+'
46exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:unsupported, '\|') .'\)\([-[:alnum:]_./]*\)+'
Bram Moolenaard2cec5b2006-03-28 21:08:56 +000047
48" Associate our matches and regions with pretty colours
Bram Moolenaarf2571c62015-06-09 19:44:55 +020049hi def link debsourcesLine Error
50hi def link debsourcesKeyword Statement
51hi def link debsourcesDistrKeyword Type
52hi def link debsourcesUnsupportedDistrKeyword WarningMsg
53hi def link debsourcesComment Comment
54hi def link debsourcesUri Constant
Bram Moolenaard2cec5b2006-03-28 21:08:56 +000055
56let b:current_syntax = "debsources"