aboutsummaryrefslogtreecommitdiff
path: root/vim/syntax/paludis-licenses-conf.vim
blob: 496d249796f3adc07df7feb3cf05f0a77843f841 (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
" 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
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 PaludisLicensesConfSet              Special
hi def link PaludisLicensesConfLicense          Keyword
hi def link PaludisLicensesConfContinuation     Preproc

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