[pacman-contrib] [PATCH 2/2] vim: add syntax for b2sums, recently added to makepkg
Eli Schwartz
eschwartz at archlinux.org
Wed Apr 17 02:49:42 UTC 2019
Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---
This can of course be pulled at any time, unlike the previous patch.
src/vim/syntax/PKGBUILD.vim | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/vim/syntax/PKGBUILD.vim b/src/vim/syntax/PKGBUILD.vim
index 8e3e1b9..e02772e 100644
--- a/src/vim/syntax/PKGBUILD.vim
+++ b/src/vim/syntax/PKGBUILD.vim
@@ -216,6 +216,17 @@ hi def link pbSha512Quotes Keyword
hi def link pbSha512Hash Error
hi def link pbValidSha512sums Number
+" b2sums
+syn keyword pb_k_b2sums b2sums contained
+syn match pbIllegalB2sums /[^='"()\/ ]/ contained contains=pbValidB2sums
+syn match pbValidB2sums /\x\{128\}/ contained
+syn region pbB2sumsGroup start=/^b2sums/ end=/)/ contains=pb_k_b2sums,pbB2Quotes,pbB2Hash,pbIllegalB2sums keepend
+syn match pbB2Quotes /'.*'\|".*"/ contained contains=pbB2Hash,pbIllegalB2sums
+syn match pbB2Hash /\x\+/ contained contains=pbValidB2sums
+hi def link pbB2Quotes Keyword
+hi def link pbB2Hash Error
+hi def link pbValidB2sums Number
+
" options
syn keyword pb_k_options options contained
syn match pbOptions /\(no\)\?\(strip\|docs\|libtool\|emptydirs\|zipman\|purge\|distcc\|color\|ccache\|check\|sign\|makeflags\|buildflags\)/ contained
--
2.21.0
More information about the pacman-contrib
mailing list