aboutsummaryrefslogtreecommitdiff
path: root/vim/syntax/paludis-use-conf.vim
blob: 2779ece0b5e33a80bd1512be00bf3b08b735ca35 (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
41
42
43
" Vim syntax file
" Language:	Paludis use.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 use.conf files.
"

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

if exists("b:current_syntax")
  finish
endif

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

syn match  PaludisUseConfPDS /^[^ \t#\/]\+\/[^ \t#\/]\+\s*/
	    \ nextgroup=PaludisUseConfFlag,PaludisUseConfContinuation
            \ contains=PaludisUseConfWildcard
syn match  PaludisUseConfWildcard contained /\(\*\/\@=\|\/\@<=\*\)/
syn match  PaludisUseConfSet /^[^ \t#\/]\+\S\@!/
	    \ nextgroup=PaludisUseConfFlag,PaludisUseConfPrefix,PaludisUseConfContinuation skipwhite
syn match  PaludisUseConfFlag contained /[a-zA-Z0-9\-_*]\+:\@!/
	    \ nextgroup=PaludisUseConfFlag,PaludisUseConfPrefix,PaludisUseConfContinuation skipwhite
syn match  PaludisUseConfPrefix contained /[a-zA-Z0-9_*][a-zA-Z0-9\-_*]*:/
	    \ nextgroup=PaludisUseConfFlag,PaludisUseConfPrefix,PaludisUseConfContinuation skipwhite
syn match  PaludisUseConfContinuation contained /\\$/
	    \ nextgroup=PaludisUseConfFlag,PaludisUseConfPrefix,PaludisUseConfContinuation skipwhite skipnl

hi def link PaludisUseConfComment          Comment
hi def link PaludisUseConfPDS              Identifier
hi def link PaludisUseConfSet              Special
hi def link PaludisUseConfWildcard         Special
hi def link PaludisUseConfPrefix           Constant
hi def link PaludisUseConfFlag             Keyword
hi def link PaludisUseConfContinuation     Preproc

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