Author: glen Date: Mon May 17 16:40:11 2010 GMT Module: packages Tag: HEAD ---- Log message: - ~/.my.cnf, mysqld.conf, mysql-proxy.conf ..., based on dosini.vim
---- Files affected: packages/vim-syntax-mycnf: mycnf.vim (NONE -> 1.1) (NEW), vim-syntax-mycnf.spec (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/vim-syntax-mycnf/mycnf.vim diff -u /dev/null packages/vim-syntax-mycnf/mycnf.vim:1.1 --- /dev/null Mon May 17 18:40:11 2010 +++ packages/vim-syntax-mycnf/mycnf.vim Mon May 17 18:40:06 2010 @@ -0,0 +1,44 @@ +" Vim syntax file +" Language: MySQL like config files (~/.my.cnf and friends) +" Version Info: $Id$ +" Author: Elan Ruusamäe <[email protected]> +" URL: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/vim-syntax-mycnf/ +" Last Change: $Date$ +" Comments: Based on dosini.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" shut case off +syn case ignore + +syn match mycnfLabel "^.\{-}=" +syn region mycnfHeader start="^\[" end="\]" +syn match mycnfComment "^#.*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_mycnf_syntax_inits") + if version < 508 + let did_mycnf_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink mycnfHeader Special + HiLink mycnfComment Comment + HiLink mycnfLabel Type + + delcommand HiLink +endif + +let b:current_syntax = "mycnf" + +" vim:ts=4:sw=4 ================================================================ Index: packages/vim-syntax-mycnf/vim-syntax-mycnf.spec diff -u /dev/null packages/vim-syntax-mycnf/vim-syntax-mycnf.spec:1.1 --- /dev/null Mon May 17 18:40:11 2010 +++ packages/vim-syntax-mycnf/vim-syntax-mycnf.spec Mon May 17 18:40:06 2010 @@ -0,0 +1,51 @@ +# $Revision$, $Date$ +%define syntax mycnf +Summary: Vim syntax: MySQL-like config files (~/.my.cnf and friends). +Name: vim-syntax-%{syntax} +Version: 1.1 +Release: 1 +License: GPL v2 +Group: Applications/Editors/Vim +Source0: mycnf.vim +URL: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/vim-syntax-mycnf/ +Requires: vim-rt >= 4:7.2.170 +BuildArch: noarch +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%define _vimdatadir %{_datadir}/vim + +%description +Vim syntax for MySQL-like config files (~/.my.cnf and friends). + +%prep +rev=$(awk '/^".*Revision:/{print $5}' %{SOURCE0}) +if [ "$rev" != "%{version}" ]; then + : Update version $rev, and retry + exit 1 +fi + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT%{_vimdatadir}/{syntax,ftdetect} +cp -a %{SOURCE0} $RPM_BUILD_ROOT%{_vimdatadir}/syntax + +cat > $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect/%{syntax}.vim <<-EOF +au BufNewFile,BufRead .my.cnf,mysqld.conf,mysql*.conf setf %{syntax} +EOF + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%{_vimdatadir}/syntax/*.vim +%{_vimdatadir}/ftdetect/*.vim + +%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) +%changelog +* %{date} PLD Team <[email protected]> +All persons listed below can be reached at <cvs_login>@pld-linux.org + +$Log$ +Revision 1.1 2010/05/17 16:40:06 glen +- ~/.my.cnf, mysqld.conf, mysql-proxy.conf ..., based on dosini.vim ================================================================ _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
