Mercurial > vim
annotate runtime/syntax/debsources.vim @ 7504:013f285f31a6 v7.4.1054
commit https://github.com/vim/vim/commit/2795e21eaafaeaf95a91667fd411023280d0f902
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 5 22:04:49 2016 +0100
patch 7.4.1054
Problem: Illegal memory access.
Solution: Check for missing pattern. (Dominique Pelle)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 05 Jan 2016 22:15:04 +0100 |
parents | aea5ebf352c4 |
children | 071f9da012fb |
rev | line source |
---|---|
816 | 1 " Vim syntax file |
1668 | 2 " Language: Debian sources.list |
3 " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> | |
4 " Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> | |
7384
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
5 " Last Change: 2015 Oct 24 |
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
6 " URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim |
816 | 7 |
8 " Standard syntax initialization | |
9 if version < 600 | |
10 syntax clear | |
11 elseif exists("b:current_syntax") | |
12 finish | |
13 endif | |
14 | |
15 " case sensitive | |
16 syn case match | |
17 | |
18 " A bunch of useful keywords | |
1668 | 19 syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|restricted\|universe\|multiverse\)/ |
816 | 20 |
21 " Match comments | |
2034 | 22 syn match debsourcesComment /#.*/ contains=@Spell |
816 | 23 |
6823 | 24 let s:cpo = &cpo |
25 set cpo-=C | |
26 let s:supported = [ | |
27 \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', | |
28 \ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy', | |
29 \ | |
7384
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
30 \ 'precise', 'trusty', 'vivid', 'wily', 'xenial', 'devel' |
6823 | 31 \ ] |
32 let 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', | |
7384
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
38 \ 'maverick', 'natty', 'oneiric', 'quantal', 'raring', 'saucy', |
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
39 \ 'utopic' |
6823 | 40 \ ] |
41 let &cpo=s:cpo | |
42 | |
816 | 43 " Match uri's |
1668 | 44 syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++ |
6823 | 45 exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:supported, '\|'). '\)\([-[:alnum:]_./]*\)+' |
46 exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:unsupported, '\|') .'\)\([-[:alnum:]_./]*\)+' | |
816 | 47 |
48 " Associate our matches and regions with pretty colours | |
6823 | 49 hi def link debsourcesLine Error |
50 hi def link debsourcesKeyword Statement | |
51 hi def link debsourcesDistrKeyword Type | |
52 hi def link debsourcesUnsupportedDistrKeyword WarningMsg | |
53 hi def link debsourcesComment Comment | |
54 hi def link debsourcesUri Constant | |
816 | 55 |
56 let b:current_syntax = "debsources" |