## syntax and configuration file for the nano editor from http://www.nano-editor.org
## syntax for newLISP, C, HTML, nanorc
## this file works on nano versions 2.0.1 and later 
## tested on nano 2.0.1 Mac OS X and nano 2.0.7 Linux, FreeBSD, LM 2008
## version 1.09 ready for newLISP v 10.0
## version 1.10 ready for newLISP v 10.0.6
## version 1.11 ready for newLISP v 10.1
## version 1.12 added a few missing functions
## version 1.13 added new 'self'
## version 1.14 added new 'extend'
## version 1.15 added new 'term', "++", "--", eliminated 'name'
## version 1.16 added new 'net-packet'
## version 1.17 added new 'net-ipv'
## version 1.18 added new 'date-parse' is new writing of 'parse-date'
## version 1.19 added new 'date-list'

# make sure that lines are not broken when copying/pasting this, maximize browser window

## outcomment the following to customize, there are more then the following
## options depending on nano version, see manpage for nanorc for details
set autoindent    #
set casesensitive # onsearch
#set const         # always show line/cursor position status line
set morespace     # no top blank line
set suspend       # recognize Ctrl-z
set noconvert     # dont't convert from DOS
#set nohelp        # no bottom help
set quickblank    # clear bottom status after 1 keystroke
set smooth        # scoll smooth without jumping cursor to center
set tabsize 4     #
set historylog
#set tabstospaces # use spaces instead of tabs

syntax "lisp" "\.lsp$"
## keywords
color blue "([[:space:]()]|^)(\!|\!=|\$|%|&|\*|\+|\+\+|-|--|/|:|<|<<|<=|=|>|>=|>>|@|NaN\?|^|abort|abs|acos|acosh)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(add|address|amb|and|append|append-file|apply|args|array|array-list|array\?)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(asin|asinh|assoc|atan|atan2|atanh|atom\?|base64-dec|base64-enc|bayes-query)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(bayes-train|begin|beta|betai|bind|binomial|bits|callback|case|catch)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(ceil|change-dir|char|chop|clean|close|command-event|cond|cons|constant|context)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(context\?|copy|copy-file|cos|cosh|count|cpymem|crc32|crit-chi2|crit-z|current-line)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(curry|date|date-parse|date-list|date-value|debug|dec|def-new|default|define|define-macro)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(delete|delete-file|delete-url|destroy|det|device|difference|directory|directory\?)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(div|do-until|do-while|doargs|dolist|dostring|dotimes|dotree|dump|dup|empty\?)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(encrypt|ends-with|env|erf|error-event|eval|eval-string)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(exec|exists|exit|exp|expand|explode|extend|factor|fft|file-info|file\?|filter|find)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(find-all|first|flat|float|float\?|floor|flt|for|for-all|fork|format|fv|gammai)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(gammaln|gcd|get-char|get-float|get-int|get-long|get-string|get-url|global|global\?|if)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(ifft|import|inc|inf?|index|int|integer|integer\?|intersect|invert|irr|join|lambda\?|last)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(last-error|legal\?|length|let|letex|letn|list|list\?|load|local|log|lookup|lower-case)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(macro\?|main-args|make-dir|map|mat|match|max|member|min|mod|mul|multiply)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(net-accept|net-close|net-connect|net-error|net-eval|net-interface|net-ipv|net-listen)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(net-local|net-lookup|net-packet|net-peek|net-peer|net-ping|net-receive|net-receive-from)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(net-receive-udp|net-select|net-send|net-send-to|net-send-udp|net-service)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(net-sessions|new|nil|nil\?|normal|not|now|nper|npv|nth|null\?|number\?)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(open|or|ostype|pack|parse|path|peek|pipe|pmt|pop|pop-assoc|post-url)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(pow|prefix|pretty-print|primitive\?|print|println|prob-chi2|prob-z|process)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(prompt-event|protected\?|push|put-url|pv|quote|quote\?|rand|random|randomize|read)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(read-buffer|read-char|read-expr|read-file|read-key|read-line|reader-event|real-path)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(receive|ref|ref-all|regex|regex-comp|remove-dir|rename-file|replace|replace-assoc)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(reset|rest|reverse|rotate|round|save|search|seed|seek|select|self|semaphore|send)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(sequence|series|set|set-locale|set-ref|set-ref-all|setf|setq|sgn|share)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(signal|silent|sin|sinh|sleep|slice|sort|source|spawn|sqrt|starts-with|string)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(string\?|sub|swap|sym|symbol\?|symbols|sync|sys-error|sys-info|tan|tanh|term|throw)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(throw-error|time|time-of-day|timer|title-case|trace|trace-highlight|transpose)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(trim|true|true\?|unicode|unify|unique|unless|unpack|until|upper-case|utf8|utf8len)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(uuid|wait-pid|when|while|write|write-buffer|write-char|write-file|write-line)([[:space:]()]|$)"
color blue "([[:space:]()]|^)(xfer-event|xml-error|xml-parse|xml-type-tags|zero\?|\||~)([[:space:]()]|$)"
## decimal and float numbers
color yellow "(^|[[:space:]()-])([0-9]+|[0-9]+\.[0-9]+)"
## hex numbers
color yellow "(^|[[:space:]()-])0x[0-9a-fA-F]+"
## symbols
color cyan "'[^ ()]+"
## parenthesis
color red "(\(|\))"
## quoted strings
color green "\"(\\.|[^\"])*\""
## braced strings
color green start="\{" end="\}"
## comments
color magenta "(^|[[:space:]#])#.*"
color magenta "(^|[[:space:];]);.*"
## newlispdoc tags
color green "(@module|@index|@description|@location|@version|@author|@syntax|@param|@return|@example)"
## text block strings
color green start="\[text\]" end="\[/text\]"


syntax "c-file" "\.(c|h)$"
## type ids
color blue "(^|[[:space:](){}*])(float|double|char|int|short|long|enum|void|static|const)[[:space:](){}]"
color blue "(^|[[:space:](){}*])(struct|union|typedef|extern|signed|unsigned|inline)[[:space:](){}]"
## keywords
color blue "(^|[[:space:](){}])(for|if|while|do|else|case|switch|default:|goto)([[:space:](){}]|$)"
color blue "(^|[[:space:](){}])(continue|break|return)([[:space:](){}*;:]|$)"
## preprocessor, macros
color brightcyan "^ *# *(define|undef|include|ifn?def|endif|elif|else|if)"
## decimal and float numbers
color yellow "(\[|[[:space:](),;-]|^)([0-9]+|[0-9]+\.[0-9]+)"
## hex numbers
color yellow "(\[|[[:space:](),;-]|^)0x[0-9a-fA-F]+L?L?"
## constants
color red "(^|\[|\]|[[:space:]~(,;-])[A-Z_]+[A-Z_0-9]+([ (){},;:]|\[|\]|$)" 
## delimiters
color black "\[|\]|\-|\+|[(){}~,;=:]"
## strings
color green "<[^= ]*>" ""(\\.|[^\"])*""
color green start=""(\\.|[^\"])*\\ *$" end="^(\\.|[^\"])*""
## commments
color magenta "//.*"
color magenta start="/\*" end="\*/"


syntax "HTML" "\.html$"
## tags
color blue start="<" end=">"
## entities
color red "&[^; ]*;"
## quotes strings
color green "\"(\\.|[^\"])*\""


syntax "nanorc" "\.?nanorc$"
color blue "^(set|unset|color|syntax)| (start|end)"
color magenta " (bright)?(red|green|blue|cyan|magenta|yellow|black|white)"
color green " (autoindent|casesensitive|morespace|suspend|noconvert|nohelp|nonewlines)"
color green " (quickblank|smooth|tabsize|tabstospaces|const|nowrap|include|historylog)"
color yellow "[[:space:]]+[0-9]+"
color black "^#.*"

