aboutsummaryrefslogtreecommitdiff
path: root/vim/syntax/paludis-keywords-conf.vim
blob: e9d2f4f483fa29c3cf30b8f71120c9d0df96029d (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
" Vim syntax file
" Language:	Paludis keywords.conf files
" Author:	Ciaran McCreesh
" Copyright:	Copyright (c) 2007 Ciaran McCreesh
" Licence:	You may redistribute this under the same terms as Vim itself
"
" Syntax highlighting for Paludis keywords.conf files.
"

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

if exists("b:current_syntax")
  finish
endif

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

syn match  PaludisKeywordsConfPDS /^[^ \t#\/]\+\/[^ \t#\/]\+\s*/
	    \ nextgroup=PaludisKeywordsConfKeyword,PaludisKeywordsConfContinuation
            \ contains=PaludisKeywordsConfWildcard
syn match  PaludisKeywordsConfWildcard contained /\(\*\/\@=\|\/\@<=\*\)/
syn match  PaludisKeywordsConfSet /^[^ \t#\/]\+\S\@!/
	    \ nextgroup=PaludisKeywordsConfKeyword,PaludisKeywordsConfContinuation skipwhite
syn match  PaludisKeywordsConfKeyword contained /-\?\~\?[a-zA-Z0-9\-_*]\+/
	    \ nextgroup=PaludisKeywordsConfKeyword,PaludisKeywordsConfContinuation skipwhite
syn match  PaludisKeywordsConfContinuation contained /\\$/
	    \ nextgroup=PaludisKeywordsConfKeyword,PaludisKeywordsConfContinuation skipwhite skipnl

hi def link PaludisKeywordsConfComment          Comment
hi def link PaludisKeywordsConfPDS              Identifier
hi def link PaludisKeywordsConfWildcard         Special
hi def link PaludisKeywordsConfSet              Special
hi def link PaludisKeywordsConfKeyword          Keyword
hi def link PaludisKeywordsConfContinuation     Preproc

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