aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-09-15 14:56:21 +0200
committerMichał Górny <mgorny@gentoo.org>2018-08-14 15:55:26 +0200
commit1f9fef4cdffa63f49d0133910df0c5f527cb43f3 (patch)
tree01f13d6b6ae41b22a64e4f40eeb5bb7d728f5e4f
parentftdetect: Account for GLEPs using YAML-compatible preamble (diff)
downloadgentoo-syntax-1f9fef4cdffa63f49d0133910df0c5f527cb43f3.tar.gz
gentoo-syntax-1f9fef4cdffa63f49d0133910df0c5f527cb43f3.tar.bz2
gentoo-syntax-1f9fef4cdffa63f49d0133910df0c5f527cb43f3.zip
syntax/glep: Support --- around the preamble
-rw-r--r--syntax/glep.vim2
1 files changed, 2 insertions, 0 deletions
diff --git a/syntax/glep.vim b/syntax/glep.vim
index ba652e4..f1ca81c 100644
--- a/syntax/glep.vim
+++ b/syntax/glep.vim
@@ -33,6 +33,7 @@ syn region glepFoldH4 start=/^\S.\+\n'\{2,\}$/ end=/\(\n\n\S.\+\n[-=']\{2,\}\)\@
" Headers at the top of a GLEP
syn region glepHeaders start=/\%^\(.*:\)\@=/ end=/^$/ contains=glepHeaderKey
+syn region glepTripleDash start=/\%^---$/ end=/^---$/ contains=glepHeaderKey
syn region glepHeaderKey contained start=/^[A-Za-z0-9]/ end=/:/ nextgroup=glepHeaderValue skipwhite
syn region glepHeaderValue contained start=/\S/ end=/^\S\|^$/me=e-1 contains=glepHeaderEmail,glepHeaderCVSVar
syn match glepHeaderEmail contained /<[-a-zA-Z0-9\_\.]\+@[-a-zA-Z0-9\_\.]\+>/
@@ -51,6 +52,7 @@ hi link glepHeading4 Preproc
hi link glepHeading5 Special
hi link glepHeaders Define
+hi link glepTripleDash Define
hi link glepHeaderKey Keyword
hi link glepHeaderValue String
hi link glepHeaderEmail Special