aboutsummaryrefslogtreecommitdiff
path: root/vim/syntax/paludis-licenses-conf.vim
blob: 142e65887a6cd6ac1b2f386eeb25725314e02870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
" Vim syntax file
" Language:	Paludis licenses.conf files
" Author:	Ciaran McCreesh <ciaranm@gentoo.org>
" Copyright:	Copyright (c) 2007 Ciaran McCreesh
" Licence:	You may redistribute this under the same terms as Vim itself
"
" Syntax highlighting for Paludis licenses.conf files.
"

if &compatible || v:version < 700
    finish
endif

if exists("b:current_syntax")
  finish
endif

syn region PaludisLicensesConfComment start=/^\s*#/ end=/$/

syn match  PaludisLicensesConfPDS /^[^ \t#\/]\+\/[^ \t#\/]\+\s*/
	    \ nextgroup=PaludisLicensesConfLicense,PaludisLicensesConfContinuation
            \ contains=PaludisLicensesConfWildcard
syn match  PaludisLicensesConfWildcard contained /\(\*\/\@=\|\/\@<=\*\)/
syn match  PaludisLicensesConfSet /^[^ \t#\/]\+\S\@!/
	    \ nextgroup=PaludisLicensesConfLicense,PaludisLicensesConfContinuation skipwhite
syn match  PaludisLicensesConfLicense contained /-\?[a-zA-Z0-9\-_*]\+/
	    \ nextgroup=PaludisLicensesConfLicense,PaludisLicensesConfContinuation skipwhite
syn match  PaludisLicensesConfContinuation contained /\\$/
	    \ nextgroup=PaludisLicensesConfLicense,PaludisLicensesConfContinuation skipwhite skipnl

hi def link PaludisLicensesConfComment          Comment
hi def link PaludisLicensesConfPDS              Identifier
hi def link PaludisLicensesConfWildcard         Special
hi def link PaludisLicensesConfSet              Special
hi def link PaludisLicensesConfLicense          Keyword
hi def link PaludisLicensesConfContinuation     Preproc

let b:current_syntax = "paludis-licenses-conf"