Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   PKGBUILD.vim: improve 'options' highlighting, add extra keywords (http://www.linux-archive.org/archlinux-pacman-development/691229-pkgbuild-vim-improve-options-highlighting-add-extra-keywords.html)

08-06-2012 06:29 PM

PKGBUILD.vim: improve 'options' highlighting, add extra keywords
 
From: "Jason St. John" <jstjohn@purdue.edu>

This fixes the current syntax highlighting behavior in the 'options'
array, which does *not* flag illegal options (e.g. typos, unsupported
options). The shDoubleQuote and shSingleQuote options were the culprits.
Now, if you enter `'!imptydurs'`, the typoed option will be flagged red.

I also added syntax highlighting for the new options listed in `man 5
makepkg.conf`, which I believe were introduced around pacman 4.0.0.

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
---
contrib/PKGBUILD.vim | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/PKGBUILD.vim b/contrib/PKGBUILD.vim
index 65fe489..9157063 100644
--- a/contrib/PKGBUILD.vim
+++ b/contrib/PKGBUILD.vim
@@ -211,10 +211,10 @@ hi def link pbValidSha512sums Number

" options
syn keyword pb_k_options options contained
-syn match pbOptions /(no)?(strip|docs|libtool|emptydirs|zipman|ccache|d istcc|makeflags|buildflags)/ contained
+syn match pbOptions /(no)?(strip|docs|libtool|emptydirs|zipman|purge|up x|fakeroot|distcc|color|ccache|check|sign|makeflag s|buildflags)/ contained
syn match pbOptionsNeg /!/ contained
syn match pbOptionsDeprec /no/ contained
-syn region pbOptionsGroup start=/^options=(/ end=/)/ contains=pb_k_options,pbOptions,pbOptionsNeg,pbOpt ionsDeprec,pbIllegalOption,shDoubleQuote,shSingleQ uote
+syn region pbOptionsGroup start=/^options=(/ end=/)/ contains=pb_k_options,pbOptions,pbOptionsNeg,pbOpt ionsDeprec,pbIllegalOption
syn match pbIllegalOption /[^!"'()= ]/ contained contains=pbOptionsDeprec,pbOptions

" noextract
--
1.7.11.4


All times are GMT. The time now is 06:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.