diff options
Diffstat (limited to 'syntax/gentoo-package-common.vim')
-rw-r--r-- | syntax/gentoo-package-common.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/syntax/gentoo-package-common.vim b/syntax/gentoo-package-common.vim new file mode 100644 index 0000000..1e8091e --- /dev/null +++ b/syntax/gentoo-package-common.vim @@ -0,0 +1,21 @@ +" 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\})/ + +hi def link GentooPackageComment Comment +hi def link GentooPackageEmail Special +hi def link GentooPackageDate Number |