diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2017-09-27 20:43:42 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2017-09-27 20:43:42 +0200 |
commit | 5b77877888162f4e415fe9a7b8c5e9fb5dfb6ee1 (patch) | |
tree | 965ae5128797f3d42d78d02692e62d24a4596e19 /syntax/debsources.vim | |
parent | 8148255ef1c416f414c3a78405eff08fe149d16e (diff) | |
download | vim-polyglot-5b77877888162f4e415fe9a7b8c5e9fb5dfb6ee1.tar.gz vim-polyglot-5b77877888162f4e415fe9a7b8c5e9fb5dfb6ee1.zip |
Add syntax files from upstream vim repository
Diffstat (limited to 'syntax/debsources.vim')
-rw-r--r-- | syntax/debsources.vim | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/syntax/debsources.vim b/syntax/debsources.vim new file mode 100644 index 00000000..8c4b9073 --- /dev/null +++ b/syntax/debsources.vim @@ -0,0 +1,58 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vim') == -1 + +" Vim syntax file +" Language: Debian sources.list +" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> +" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> +" Last Change: 2017 Apr 22 +" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim + +" Standard syntax initialization +if exists("b:current_syntax") + 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 + +let s:cpo = &cpo +set cpo-=C +let s:supported = [ + \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', + \ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy', + \ + \ 'trusty', 'xenial', 'yakkety', 'zesty', 'artful', 'devel' + \ ] +let s:unsupported = [ + \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', + \ 'woody', 'sarge', 'etch', 'lenny', + \ + \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', + \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', + \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', + \ 'utopic', 'vivid', 'wily' + \ ] +let &cpo=s:cpo + +" Match uri's +syn match debsourcesUri +\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++ +exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:supported, '\|'). '\)\>\([-[:alnum:]_./]*\)+' +exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:unsupported, '\|') .'\)\>\([-[:alnum:]_./]*\)+' + +" Associate our matches and regions with pretty colours +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 + +let b:current_syntax = "debsources" + +endif |