nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

spec.nanorc (2194B)


      1 ## Syntax highlighting for RPM spec files.
      2 
      3 ## Original author:  Asterios Dramis
      4 
      5 syntax spec "\.spec(\.[^/]+)?$"
      6 comment "#"
      7 
      8 # Main tags.
      9 color brightblue "\<(Name|Version|Release|Summary|Group|URL|Url|Epoch|Icon|Serial)[[:space:]]*:"
     10 color brightblue "\<(BuildArch(itectures)?|Exclusive(Arch|OS)|Exclude(Arch|OS))[[:space:]]*:"
     11 color brightblue "\<(Provides|Requires(\(.*\))?|Obsoletes|Conflicts|Recommends|Suggests|Supplements|Enhances|PreReq)[[:space:]]*:"
     12 color brightblue "\<(BuildRoot|BuildRequires|BuildConflicts|Prefix|RemovePathPostfixes)[[:space:]]*:"
     13 color brightblue "\<(AutoReq|AutoProv|AutoReqProv)[[:space:]]*:"
     14 color brightblue "\<(License|Copyright|Distribution|Vendor|Packager)[[:space:]]*:"
     15 color brightblue "\<((Source|Patch)[0-9]*|Nosource|Nopatch)[[:space:]]*:"
     16 # Architectures.
     17 color brightred "\<((a|loong)arch64|alpha(ev(56?|67?)|pca56)?|amd64|armv(3l|4b|4l|5t(ej?)?l|6h?l|7(hn?)?l|8h?l)|athlon|em64t|geode|i370|i(3|4|5|6)86|ia32e|ia64|m68k(mint)?|mips(64)?(el|r6|r6el)?)\>"
     18 color brightred "\<(pentium(3|4)|ppc(32dy4|8260|8560)?|ppc64(le|p7)?|ppc(64)?(i|p)series|riscv64|rs6000|s390x?|sgi|sh(3|4|4a)?|sparc(64v?|v8|v9v?)?|x86_64(_v2|_v3|_v4)?|xtensa)\>"
     19 
     20 # Architecture and OS conditionals.
     21 color brightred "%(ifarch|elifarch|ifnarch|ifos|elifos|ifnos)\>"
     22 # %* strings.
     23 color green "%([A-Z_a-z_0-9_]*)"
     24 color magenta "%_([A-Z_a-z_0-9_]*)"
     25 color yellow start="%__" end="\ "
     26 color magenta start="%\{" end="\}"
     27 color yellow start="%\{__" end="\}"
     28 # Sections.
     29 color red "^%((prep|build|install|check|clean)$|(description|files|package|changelog)\>)"
     30 color red "^%((pre|post)(trans|un)?|trigger(prein|in|un|postun)?)\>"
     31 color red "^%(trans)?filetrigger(in|un|postun)\>"
     32 color red "^%(sourcelist|patchlist|generate_buildrequires|verifyscript)\>"
     33 # Conditionals and defines.
     34 color brightred "%(if|elif|else|endif|define|global|undefine)\>"
     35 
     36 # Comments.
     37 color cyan "(#|%dnl[[:space:]]).*"
     38 # Special case: "# norootforbuild" is handled as main tag.
     39 color brightblue "^# norootforbuild"
     40 # For %changelog entries: first the author, then just the date.
     41 color yellow "^\* .+>"
     42 color brightyellow "^\* [[:alnum:] ]+ [0-9]{4} "
     43 
     44 # Trailing whitespace.
     45 color ,green "[[:space:]]+$"