From 6820be9ba1e760e66df1d4cc1a73c04b55bdb00a Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Sun, 9 Mar 2008 23:46:35 +0100 Subject: PKGBUILD.vim: improve invalid arch/license detection. If we had : arch=(fake) The fake string would be highlighted because it's invalid. But if we had : arch=('fake') it didn't work. Fix this for both arch and license arrays. Signed-off-by: Chantry Xavier --- contrib/PKGBUILD.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'contrib') diff --git a/contrib/PKGBUILD.vim b/contrib/PKGBUILD.vim index bf4b2ee5..7aacafb6 100644 --- a/contrib/PKGBUILD.vim +++ b/contrib/PKGBUILD.vim @@ -57,7 +57,7 @@ syn keyword pb_k_license license contained syn keyword pbLicense APACHE CDDL EPL FDL GPL LGPL MPL PHP RUBY ZLIB ISC MIT BSD contained syn match pbLicenseCustom /custom\(:[[:alnum:]]*\)*/ contained syn match pbIllegalLicense /[^='"() ]/ contained contains=pbLicenseCustom,pbLicense -syn region pbLicenseGroup start=/^license=(/ end=/)/ contains=pb_k_license,pbLicenseCustom,pbLicense,pbIllegalLicense,shDoubleQuote,shSingleQuote +syn region pbLicenseGroup start=/^license=(/ end=/)/ contains=pb_k_license,pbLicenseCustom,pbLicense,pbIllegalLicense " backup syn keyword pb_k_backup backup contained @@ -67,8 +67,8 @@ syn region pbBackupGroup start=/^backup=(/ end=/)/ contains=pb_k_backup,pbValidB " arch syn keyword pb_k_arch arch contained syn keyword pbArch i686 x86_64 ppc contained -syn match pbIllegalArch /[^='() ]/ contained contains=pbArch -syn region pbArchGroup start=/^arch=(/ end=/)/ contains=pb_k_arch,pbArch,pbIllegalArch,shDoubleQuote,shSingleQuote +syn match pbIllegalArch /[^='"() ]/ contained contains=pbArch +syn region pbArchGroup start=/^arch=(/ end=/)/ contains=pb_k_arch,pbArch,pbIllegalArch " groups syn keyword pb_k_groups groups contained -- cgit v1.2.3-70-g09d2 From 7d451b6e6bc3926589a77e6a2d191e4f158d3980 Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Mon, 10 Mar 2008 19:55:15 +0100 Subject: PKGBUILD.vim: add keepend keyword for sha1/md5 fields in PKGBUILD.proto, we have the following line md5sums=() #generate with 'makepkg -g' if we add a md5sum inside quotes, or even just the quotes : md5sums=('') #generate with 'makepkg -g' the highlighting will be totally messed up. Adding the keepend keyword fixes this. Signed-off-by: Chantry Xavier Signed-off-by: Dan McGee --- contrib/PKGBUILD.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/PKGBUILD.vim b/contrib/PKGBUILD.vim index 7aacafb6..57e4cf0e 100644 --- a/contrib/PKGBUILD.vim +++ b/contrib/PKGBUILD.vim @@ -131,7 +131,7 @@ hi def link pbDerefEmulation PreProc syn keyword pb_k_md5sums md5sums contained syn match pbIllegalMd5sums /[^='"()\/ ]/ contained contains=pbValidMd5sums syn match pbValidMd5sums /[[:alnum:]]\{32\}/ contained -syn region pbMd5sumsGroup start=/^md5sums/ end=/)/ contains=pb_k_md5sums,pbMd5Quotes,pbMd5Hash,pbIllegalMd5sums +syn region pbMd5sumsGroup start=/^md5sums/ end=/)/ contains=pb_k_md5sums,pbMd5Quotes,pbMd5Hash,pbIllegalMd5sums keepend syn match pbMd5Quotes /'.*'\|".*"/ contained contains=pbMd5Hash,pbIllegalMd5sums syn match pbMd5Hash /[[:alnum:]]\+/ contained contains=pbValidMd5sums hi def link pbMd5Quotes Keyword @@ -142,7 +142,7 @@ hi def link pbValidMd5sums Number syn keyword pb_k_sha1sums sha1sums contained syn match pbIllegalSha1sums /[^='"()\/ ]/ contained contains=pbValidSha1sums syn match pbValidSha1sums /[[:alnum:]]\{40\}/ contained -syn region pbSha1sumsGroup start=/^sha1sums/ end=/)/ contains=pb_k_sha1sums,pbSha1Quotes,pbSha1Hash,pbIllegalSha1sums +syn region pbSha1sumsGroup start=/^sha1sums/ end=/)/ contains=pb_k_sha1sums,pbSha1Quotes,pbSha1Hash,pbIllegalSha1sums keepend syn match pbSha1Quotes /'.*'\|".*"/ contained contains=pbSha1Hash,pbIllegalSha1sums syn match pbSha1Hash /[[:alnum:]]\+/ contained contains=pbValidSha1sums hi def link pbSha1Quotes Keyword -- cgit v1.2.3-70-g09d2