nanorc/rpmspec.nanorc
Jody Leonard b64de43467 Change tab coloring behavior for several rc's
The commit mariuszs/nanorc@e5cc8be863
introduced a number of rc files that cause tabs to always show as red
(even with trailing spaces). Adjust the behavior according to changes in
https://github.com/nanorc/nanorc/blob/master/mixins/lint.nanorc, which
seems to be an updated source of the original commit. Make tabs appear
green without trailing characters, red with trailing spaces, and
uncolored when followed by any other character.
2015-10-24 06:58:36 -04:00

28 lines
1.6 KiB
Plaintext

syntax "rpmspec" "\.spec$" "\.rpmspec$"
color cyan "\<(Icon|ExclusiveOs|ExcludeOs):"
color cyan "\<(BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch):"
color cyan "\<(Conflicts|Obsoletes|Provides|Requires|Requires\(.*\)|Enhances|Suggests|BuildConflicts|BuildRequires|Recommends|PreReq|Supplements):"
color cyan "\<(Epoch|Serial|Nosource|Nopatch):"
color cyan "\<(AutoReq|AutoProv|AutoReqProv):"
color cyan "\<(Copyright|License|Summary|Summary\(.*\)|Distribution|Vendor|Packager|Group|Source[0-9]*|Patch[0-9]*|BuildRoot|Prefix):"
color cyan "\<(Name|Version|Release|Url|URL):"
color cyan start="^(Source|Patch)" end=":"
color cyan "(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)"
color cyan "(ifarch|ifnarch|ifos|ifnos)"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightyellow "%(if|else|endif|define|global|undefine)"
color brightyellow "%_?([A-Z_a-z_0-9_]*)"
color brightyellow start="%\{" end="\}"
color brightyellow start="%\{__" end="\}"
color brightyellow "\$(RPM_BUILD_ROOT)\>"
color brightmagenta "^%(build$|changelog|check$|clean$|description)"
color brightmagenta "^%(files|install$|package|prep$)"
color brightmagenta "^%(pre|preun|pretrans|post|postun|posttrans)"
color brightmagenta "^%(trigger|triggerin|triggerpostun|triggerun|verifyscript)"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color blue "^\*.*$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"
color brightwhite,cyan "TODO:?"