tcl.nanorc (2206B)
1 ## Syntax highlighting for Tcl and Expect scripts. 2 3 ## Original author: Mike Frysinger 4 ## License: GPL version 3 or newer 5 6 syntax tcl "\.(tcl|exp)$" 7 magic "Tcl(/Tk)? script" 8 comment "#" 9 10 # Standard Tcl [info commands]: 11 color green "\<(after|append|array|auto_(execok|import|load(_index)?|qualify)|binary|break)\>" 12 color green "\<(case|catch|cd|clock|close|concat|continue|encoding|eof|error|eval|exec|exit|expr)\>" 13 color green "\<(fblocked|fconfigure|fcopy|file(event)?|flush|for|foreach|format|gets|glob|global|history)\>" 14 color green "\<(if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort)\>" 15 color green "\<(namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return)\>" 16 color green "\<(scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace)\>" 17 color green "\<(unknown|unset|update|uplevel|upvar|variable|vwait|while)\>" 18 19 # Basic Tcl subcommands: 20 color green "\<array (anymore|donesearch|exists|get|names|nextelement|set|size|startsearch|statistics|unset)\>" 21 color green "\<string (compare|equal|first|index|is|last|(byte)?length|map|match|range|repeat|replace|to(lower|title|upper)?|trim(left|right)?|will|word(end|start))\>" 22 23 # Extended TclX [info commands]: 24 color green "\<(alarm|auto_load_pkg|bsearch|cat(close|gets|open)|ccollate|cconcat|cequal|chgrp|chmod|chown|chroot)\>" 25 color green "\<(cindex|clength|cmdtrace|commandloop|crange|csubstr|ctoken|ctype|dup|echo|execl)\>" 26 color green "\<(fcntl|flock|fork|fstat|ftruncate|funlock|host_info|id|infox|keyl(del|get|keys|set)|kill)\>" 27 color green "\<(lassign|lcontain|lempty|lgets|link|lmatch|loadlibindex|loop|lvar(cat|pop|push)|max|min|nice)\>" 28 color green "\<(pipe|profile|random|readdir|replicate|scan(context|file|match)|select|server_(accept|create)|signal)\>" 29 color green "\<(sleep|sync|system|tclx_(findinit|fork|load_tndxs|sleep|system|wait)|times|translit|try_eval|umask|wait)\>" 30 31 # Syntax: 32 color green "[!$&();<=>\`|]" 33 color brightblue "\<proc[[:blank:]]|\{|\}" 34 color brightyellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'" 35 color brightred "\$\{?[[:alnum:]_!@#$*?-]+\}?" 36 37 # Trailing whitespace: 38 color ,green "[[:space:]]+$" 39 40 # Comments: 41 color cyan "^[[:blank:]]*#.*"