aboutsummaryrefslogtreecommitdiff
blob: ec4a48bf5c7350dcf5413a76d7e63b7514dd0790 (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
" Vim syntax file
" Language:	Gentoo use.desc, use.local.desc files
" Author:	Ciaran McCreesh <ciaranm@gentoo.org>
" Copyright:	Copyright (c) 2004-2005 Ciaran McCreesh
" Licence:	You may redistribute this under the same terms as Vim itself
"
" Syntax highlighting for Gentoo package.keywords files. Requires vim 6.3 or
" later.
"

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

if exists("b:current_syntax")
    finish
endif

runtime syntax/gentoo-common.vim

syn region GentooUseDescComment start=/#/ end=/$/
    \ contains=GentooBug

syn match GentooUseDescPackage /^\(#\)\@!\([a-zA-Z0-9\-\_+\.]\+\/[a-zA-Z0-9\-\_+]\+\)\?/ nextgroup=GentooUseDescColon,GentooUseDescFlag skipwhite
syn match GentooUseDescColon /:/ contained nextgroup=GentooUseDescFlag
syn match GentooUseDescFlag contained /[a-zA-Z0-9\-\_+@:]\+/ nextgroup=GentooUseDescDash skipwhite
syn match GentooUseDescDash /-\s*/ contained nextgroup=GentooUseDescDesc skipwhite
syn region GentooUseDescDesc start=// end=/$/ contained skipwhite

hi def link GentooUseDescComment          Comment
hi def link GentooUseDescPackage          Keyword
hi def link GentooUseDescFlag             Identifier
hi def link GentooUseDescDesc             String

let b:current_syntax = "gentoo-package-keywords"