blob: fb258c59ee3618bf2a2420668bdd7c9848284f53 (
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
|
" Vim syntax file
" Language: Gentoo package.*/use.desc/etc. common rules
" Author: Michał Górny <mgorny@gentoo.org>
" Copyright: Copyright (c) 2018 Michał Górny
" Licence: You may redistribute this under the same terms as Vim itself
if &compatible || v:version < 603
finish
endif
runtime syntax/gentoo-common.vim
syn region GentooPackageComment start=/#/ end=/$/
\ contains=GentooPackageEmail,GentooPackageDate,GentooBug
syn match GentooPackageEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/
syn match GentooPackageDate contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/
syn match GentooPackageAtom /^[\ \t]*[^ \t\n#]\+\S*\/\S\+/
\ nextgroup=@GentooPackagePostAtom skipwhite
hi def link GentooPackageComment Comment
hi def link GentooPackageEmail Special
hi def link GentooPackageDate Number
hi def link GentooPackageAtom Identifier
|