From 4c465ef0ad179622c40ce93ad103f057fb4f67a9 Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Sun, 2 Mar 2008 11:34:17 +0100 Subject: contrib/PKGBUILD.vim: add optdepends + other fixes * Add optdepends keyword * license, backup and arch keywords should be arrays * Remove the little hack to color conflicts/provides/replaces keyword even without =(). These should be arrays too. Signed-off-by: Chantry Xavier --- contrib/PKGBUILD.vim | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'contrib') diff --git a/contrib/PKGBUILD.vim b/contrib/PKGBUILD.vim index b2a8d2f8..bf4b2ee5 100644 --- a/contrib/PKGBUILD.vim +++ b/contrib/PKGBUILD.vim @@ -9,7 +9,7 @@ if version < 600 syntax clear elseif exists("b:current_syntax") - finish + finish endif let b:main_syntax = "sh" @@ -57,37 +57,38 @@ 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 match pbLicenseGroup /^license=.*/ contains=pb_k_license,pbLicenseCustom,pbLicense,pbIllegalLicense,shDoubleQuote,shSingleQuote +syn region pbLicenseGroup start=/^license=(/ end=/)/ contains=pb_k_license,pbLicenseCustom,pbLicense,pbIllegalLicense,shDoubleQuote,shSingleQuote " backup syn keyword pb_k_backup backup contained syn match pbValidBackup /\.\?[[:alpha:]]*\/[[:alnum:]\{\}+._$-]*]*/ contained -syn match pbBackupGroup /^backup=.*/ contains=pb_k_backup,pbValidBackup,shDoubleQuote,shSingleQuote +syn region pbBackupGroup start=/^backup=(/ end=/)/ contains=pb_k_backup,pbValidBackup,shDoubleQuote,shSingleQuote " arch syn keyword pb_k_arch arch contained syn keyword pbArch i686 x86_64 ppc contained syn match pbIllegalArch /[^='() ]/ contained contains=pbArch -syn match pbArchGroup /^arch=.*/ contains=pb_k_arch,pbArch,pbIllegalArch,shDoubleQuote,shSingleQuote +syn region pbArchGroup start=/^arch=(/ end=/)/ contains=pb_k_arch,pbArch,pbIllegalArch,shDoubleQuote,shSingleQuote " groups syn keyword pb_k_groups groups contained syn match pbValidGroups /\([[:alnum:]]\|+\|-\|_\)*/ contained syn region pbGroupsGroup start=/^groups=(/ end=/)/ contains=pb_k_groups,pbValidGroups,shDoubleQuote,shSingleQuote -" makedepends -syn keyword pb_k_makedepends makedepends contained -syn match pbValidMakedepends /\([[:alnum:]]\|+\|-\|_\)*/ contained -syn region pbMakedependsGroup start=/^makedepends=(/ end=/)/ contains=pb_k_makedepends,pbValidMakedepends,shDoubleQuote,shSingleQuote - " depends syn keyword pb_k_depends depends contained syn match pbValidDepends /\([[:alnum:]]\|+\|-\|_\)*/ contained syn region pbDependsGroup start=/^depends=(/ end=/)/ contains=pb_k_depends,pbValidDepends,shDoubleQuote,shSingleQuote -" XXX little hack to color conflicts/provides/replaces keyword even without =() -syn match pbkw /^\(conflicts\|provides\|replaces\)/ contains=pb_k_conflicts,pb_k_provides,pb_k_replaces -hi def link pbkw keyword +" makedepends +syn keyword pb_k_makedepends makedepends contained +syn match pbValidMakedepends /\([[:alnum:]]\|+\|-\|_\)*/ contained +syn region pbMakedependsGroup start=/^makedepends=(/ end=/)/ contains=pb_k_makedepends,pbValidMakedepends,shDoubleQuote,shSingleQuote + +" optdepends +syn keyword pb_k_optdepends optdepends contained +syn match pbValidOptdepends /\([[:alnum:]]\|+\|-\|_\)*/ contained +syn region pbOptdependsGroup start=/^optdepends=(/ end=/)/ contains=pb_k_optdepends,pbValidOptdepends,shDoubleQuote,shSingleQuote " conflicts syn keyword pb_k_conflicts conflicts contained @@ -105,7 +106,7 @@ syn match pbValidReplaces /\([[:alnum:]]\|+\|-\|_\)*/ contained syn region pbReplacesGroup start=/^replaces=(/ end=/)/ contains=pb_k_replaces,pbValidReplaces,shDoubleQuote,shSingleQuote " install -" XXX remove install from bashStatement, fix strage bug +" XXX remove install from bashStatement, fix strange bug syn clear bashStatement syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep less ls mkdir mv rm rmdir rpm sed sleep sort strip tail touch @@ -115,7 +116,7 @@ syn match pbIllegalInstall /[^=]/ contained contains=pbValidInstall syn match pbInstallGroup /^install=.*/ contains=pb_k_install,pbValidInstall,pbIllegalInstall,shDeref,shDoubleQuote,shSingleQuote " source: -" XXX remove source from shStatement, fixstrange bug +" XXX remove source from shStatement, fix strange bug syn clear shStatement syn keyword shStatement xxx wait getopts return autoload whence printf true popd nohup enable r trap readonly fc fg kill ulimit umask disown stop pushd read history logout times local exit test pwd time eval integer suspend dirs shopt hash false newgrp bg print jobs continue functions exec help cd break unalias chdir type shift builtin let bind @@ -202,6 +203,7 @@ hi def link pbIllegalArch Error hi def link pb_k_groups pbKeywords hi def link pb_k_makedepends pbKeywords +hi def link pb_k_optdepends pbKeywords hi def link pb_k_depends pbKeywords hi def link pb_k_replaces pbKeywords hi def link pb_k_conflicts pbKeywords -- cgit v1.2.3-70-g09d2 From 724ed34ac5068bc3a44068ef4f831a431ca00346 Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Sun, 9 Mar 2008 01:50:26 +0100 Subject: rename vimproject to vimprojects and update it. There is no need to put the list of files in there, which will get outdated sooner or later. It's possible to generate the filelist in the plugin itself using \r. Signed-off-by: Chantry Xavier [Dan: add scripts/ directory] Signed-off-by: Dan McGee --- contrib/README | 3 +- contrib/vimproject | 96 ----------------------------------------------------- contrib/vimprojects | 25 ++++++++++++++ 3 files changed, 26 insertions(+), 98 deletions(-) delete mode 100644 contrib/vimproject create mode 100644 contrib/vimprojects (limited to 'contrib') diff --git a/contrib/README b/contrib/README index c9ff86f4..7eb36aae 100644 --- a/contrib/README +++ b/contrib/README @@ -19,8 +19,7 @@ listed. re-pacman - regenerate a pacman package based on installed files and the pacman database entries. Useful for reuse, or possible config file extension. -vimproject - a project file for the vim project plugin (some files listed -may need to be updated). +vimprojects - a project file for the vim project plugin. wget-xdelta.sh - A download script for pacman which allows binary deltas generated with makepkg to be used instead of downloading full binary packages. diff --git a/contrib/vimproject b/contrib/vimproject deleted file mode 100644 index c84b6762..00000000 --- a/contrib/vimproject +++ /dev/null @@ -1,96 +0,0 @@ -This is a project file for the vim-project -plugin. I like it, so decided to contribute -this to the main repo. -$ pacman -S vim-project -change the pacman= path below -$ vim -:Project vimproject - -pacman=~/devel/pacman-lib CD=. flags=S { - Makefile.am - configure.ac - libalpm=lib/libalpm/ filter="*.c *.h *.am"{ - add.c - alpm.c - alpm_list.c - backup.c - be_files.c - cache.c - conflict.c - db.c - deps.c - error.c - group.c - handle.c - log.c - md5.c - package.c - provide.c - remove.c - server.c - sync.c - trans.c - util.c - add.h - alpm.h - alpm_list.h - backup.h - cache.h - conflict.h - db.h - deps.h - error.h - group.h - handle.h - log.h - md5.h - package.h - provide.h - remove.h - server.h - sync.h - trans.h - util.h - Makefile.am - Makefile.in - } - pacman=src/pacman/ filter="*.c *.h *.am" { - add.c - conf.c - deptest.c - downloadprog.c - log.c - package.c - pacman.c - query.c - remove.c - sync.c - trans.c - upgrade.c - util.c - add.h - conf.h - deptest.h - downloadprog.h - log.h - package.h - query.h - remove.h - sync.h - trans.h - upgrade.h - util.h - Makefile.am - } - utils=src/util filter="*.c *.h *.am" { - testpkg.c - vercmp.c - Makefile.am - } - contrib=contrib CD=. { - bash_completion - pacsearch - vimproject - zsh_completion - } -} diff --git a/contrib/vimprojects b/contrib/vimprojects new file mode 100644 index 00000000..e9adfdf1 --- /dev/null +++ b/contrib/vimprojects @@ -0,0 +1,25 @@ +This is a project file +for the vim-project plugin. +Save it as ~/.vimprojects + +$ pacman -S vim-project +change the pacman path below +$ vim +:Project + +Press \r in the project view +on a project name to generate +the list of files + +pacman=~/devel/pacman/ CD=. filter="*.ac *.am" flags=S { + libalpm=lib/libalpm/ filter="*.c *.h *.am" { + } + pacman=src/pacman/ filter="*.c *.h *.am" { + } + scripts=scripts/ filter="*.sh.in *.py.in *.am" { + } + utils=src/util filter="*.c *.h *.am" { + } + contrib=contrib CD=. { + } +} -- cgit v1.2.3-70-g09d2