blob: 232e727e815dbc7fb14f525afe23d2ae3048ebdd [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 Moolenaarf37506f2016-08-31 22:22:10 +02005" Last Change: 2016 Aug 30
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
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02009if exists("b:current_syntax")
Bram Moolenaard2cec5b2006-03-28 21:08:56 +000010 finish
11endif
12
13" case sensitive
14syn case match
15
16" A bunch of useful keywords
Bram Moolenaarc236c162008-07-13 17:41:49 +000017syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|restricted\|universe\|multiverse\)/
Bram Moolenaard2cec5b2006-03-28 21:08:56 +000018
19" Match comments
Bram Moolenaar5c736222010-01-06 20:54:52 +010020syn match debsourcesComment /#.*/ contains=@Spell
Bram Moolenaard2cec5b2006-03-28 21:08:56 +000021
Bram Moolenaarf2571c62015-06-09 19:44:55 +020022let s:cpo = &cpo
23set cpo-=C
24let s:supported = [
25 \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
26 \ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
27 \
Bram Moolenaarf37506f2016-08-31 22:22:10 +020028 \ 'precise', 'trusty', 'xenial', 'yakkety', 'devel'
Bram Moolenaarf2571c62015-06-09 19:44:55 +020029 \ ]
30let s:unsupported = [
31 \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
32 \ 'woody', 'sarge', 'etch', 'lenny',
33 \
34 \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
35 \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
Bram Moolenaar256972a2015-12-29 19:10:25 +010036 \ 'maverick', 'natty', 'oneiric', 'quantal', 'raring', 'saucy',
Bram Moolenaarf37506f2016-08-31 22:22:10 +020037 \ 'utopic', 'vivid', 'wily'
Bram Moolenaarf2571c62015-06-09 19:44:55 +020038 \ ]
39let &cpo=s:cpo
40
Bram Moolenaard2cec5b2006-03-28 21:08:56 +000041" Match uri's
Bram Moolenaarc236c162008-07-13 17:41:49 +000042syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
Bram Moolenaarf2571c62015-06-09 19:44:55 +020043exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:supported, '\|'). '\)\([-[:alnum:]_./]*\)+'
44exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:unsupported, '\|') .'\)\([-[:alnum:]_./]*\)+'
Bram Moolenaard2cec5b2006-03-28 21:08:56 +000045
46" Associate our matches and regions with pretty colours
Bram Moolenaarf2571c62015-06-09 19:44:55 +020047hi def link debsourcesLine Error
48hi def link debsourcesKeyword Statement
49hi def link debsourcesDistrKeyword Type
50hi def link debsourcesUnsupportedDistrKeyword WarningMsg
51hi def link debsourcesComment Comment
52hi def link debsourcesUri Constant
Bram Moolenaard2cec5b2006-03-28 21:08:56 +000053
54let b:current_syntax = "debsources"