nano

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

awk.nanorc (1487B)


      1 ## Syntax highlighting for AWK scripts.
      2 
      3 ## Original author:  Donnie Berkholz
      4 
      5 syntax awk "\.awk$"
      6 header "^#!.*awk"
      7 magic "awk script"
      8 comment "#"
      9 
     10 # Records.
     11 color brightred "\$[[:alnum:]_!@#$*?-]+"
     12 # Awk-set variables.
     13 color red "\<(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\>"
     14 color red "\<(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\>"
     15 color red "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>"
     16 # Function declarations and special patterns.
     17 color brightgreen "\<(function|extension|BEGIN|END)\>"
     18 # Operators and brackets/braces/slashes/parentheses.
     19 color green "[][!%&()*+/:;<=>?\^{|}~-]"
     20 # Flow control.
     21 color brightyellow "\<(for|if|while|do|else|in|delete|exit)\>"
     22 color brightyellow "\<(break|continue|return)\>"
     23 # I/O statements.
     24 color brightgreen "\<(close|fflush|getline|next|nextfile|print|printf|system)\>"
     25 # Standard functions.
     26 color magenta "\<(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\>"
     27 color magenta "\<(asort|asorti|gensub|gsub|index|length|match)\>"
     28 color magenta "\<(split|sprintf|strtonum|sub|substr|tolower|toupper)\>"
     29 color magenta "\<(mktime|strftime|systime)\>"
     30 color magenta "\<(and|compl|lshift|or|rshift|xor)\>"
     31 color magenta "\<(bindtextdomain|dcgettext|dcngettext)\>"
     32 
     33 # Strings.
     34 color brightyellow ""([^"\]|\\.)*""
     35 # Escape sequences.
     36 color brick "\\([abfnrtv\/"]|[0-7]{1,3}|x[[:xdigit:]]{1,2}|u[[:xdigit:]]{1,8})"
     37 # Comments.
     38 color brightblue "(^|[[:blank:]])#.*"
     39 
     40 # Trailing whitespace.
     41 color ,green "[[:space:]]+$"