vim.patch 5.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. The following patch adjust the RPM .spec syntax highlighting
  2. a little bit to better highlight OpenPKG RPM .spec files.
  3. Index: vim70/runtime/syntax/spec.vim
  4. --- vim70/runtime/syntax/spec.vim.orig 2004-12-31 18:29:22 +0100
  5. +++ vim70/runtime/syntax/spec.vim 2005-10-15 20:21:09 +0200
  6. @@ -83,7 +83,7 @@
  7. "One line macros - valid in all ScriptAreas
  8. "tip: remember do include new items on specScriptArea's skip section
  9. -syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(define\|patch\d*\|setup\|configure\|GNUconfigure\|find_lang\|makeinstall\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier
  10. +syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(option\|define\|undefine\|patch\d*\|setup\|configure\|GNUconfigure\|find_lang\|makeinstall\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier
  11. syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure\|GNUconfigure\|find_lang\|makeinstall\)}' end='$' contains=specCommandOpts,specMacroIdentifier
  12. "%% Files Section %%
  13. @@ -105,7 +105,7 @@
  14. "%% PreAmble Section %%
  15. "Copyright and Serial were deprecated by License and Epoch
  16. syn region specPreAmbleDeprecated oneline matchgroup=specError start='^\(Copyright\|Serial\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
  17. -syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
  18. +syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Class\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
  19. "%% Description Section %%
  20. syn region specDescriptionArea matchgroup=specSection start='^%description' end='^%'me=e-1 contains=specDescriptionOpts,specEmail,specURL,specNumber,specMacroIdentifier,specComment
  21. @@ -114,7 +114,7 @@
  22. syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment
  23. "%% Scripts Section %%
  24. -syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2
  25. +syn region specScriptArea matchgroup=specSection start='^%\(track\|prep\|build\|install\|check\|clean\|pre\|postun\|preun\|post\|test\)\>' skip='^%{\|^%\(option\|define\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2
  26. "%% Changelog Section %%
  27. syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense
  28. @@ -137,7 +137,7 @@
  29. syn match shOperator contained '[><|!&;]\|[!=]='
  30. syn region shDo transparent matchgroup=specBlock start="\<do\>" end="\<done\>" contains=ALLBUT,shFunction,shDoError,shCase,specPreAmble,@specListedFiles
  31. -syn region specIf matchgroup=specBlock start="%ifosf\|%ifos\|%ifnos\|%ifarch\|%ifnarch\|%else" end='%endif' contains=ALLBUT, specIfError, shCase
  32. +syn region specIf matchgroup=specBlock start="%if\|%ifosf\|%ifos\|%ifnos\|%ifarch\|%ifnarch\|%else" end='%endif' contains=ALLBUT, specIfError, shCase
  33. syn region shIf transparent matchgroup=specBlock start="\<if\>" end="\<fi\>" contains=ALLBUT,shFunction,shIfError,shCase,@specListedFiles
  34. @@ -151,7 +151,7 @@
  35. syn sync match shDoSync groupthere shDo "\<done\>"
  36. syn sync match shIfSync grouphere shIf "\<if\>"
  37. syn sync match shIfSync groupthere shIf "\<fi\>"
  38. -syn sync match specIfSync grouphere specIf "%ifarch\|%ifos\|%ifnos"
  39. +syn sync match specIfSync grouphere specIf "%if\|%ifarch\|%ifos\|%ifnos"
  40. syn sync match specIfSync groupthere specIf "%endIf"
  41. syn sync match shForSync grouphere shFor "\<for\>"
  42. syn sync match shForSync groupthere shFor "\<in\>"