Benno Schulenberg | c4b344f | 2014-02-23 16:07:44 +0000 | [diff] [blame] | 1 | ## Syntax highlighting for Tcl files. |
| 2 | |
Chris Allegretta | 90ee8ee | 2008-03-20 04:45:55 +0000 | [diff] [blame] | 3 | syntax "tcl" "\.tcl$" |
Mike Scalora | 6a2032f | 2016-05-25 22:13:50 +0200 | [diff] [blame] | 4 | comment "#" |
Chris Allegretta | 90ee8ee | 2008-03-20 04:45:55 +0000 | [diff] [blame] | 5 | |
Benno Schulenberg | c4b344f | 2014-02-23 16:07:44 +0000 | [diff] [blame] | 6 | # Standard Tcl [info commands]: |
Chris Allegretta | 90ee8ee | 2008-03-20 04:45:55 +0000 | [diff] [blame] | 7 | color green "\<(after|append|array|auto_execok|auto_import|auto_load|auto_load_index|auto_qualify|binary|break|case|catch|cd|clock|close|concat|continue|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|file|fileevent|flush|for|foreach|format|gets|glob|global|history|if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return|scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait|while)\>" |
Benno Schulenberg | c4b344f | 2014-02-23 16:07:44 +0000 | [diff] [blame] | 8 | # Basic Tcl subcommands: |
Chris Allegretta | 90ee8ee | 2008-03-20 04:45:55 +0000 | [diff] [blame] | 9 | color green "\<(array anymore|array donesearch|array exists|array get|array names|array nextelement|array set|array size|array startsearch|array statistics|array unset)\>" |
| 10 | color green "\<(string bytelength|string compare|string equal|string first|string index|string is|string last|string length|string map|string match|string range|string repeat|string replace|string to|string tolower|string totitle|string toupper|string trim|string trimleft|string trimright|string will|string wordend|string wordstart)\>" |
Benno Schulenberg | c4b344f | 2014-02-23 16:07:44 +0000 | [diff] [blame] | 11 | # Extended TclX [info commands]: |
Chris Allegretta | 90ee8ee | 2008-03-20 04:45:55 +0000 | [diff] [blame] | 12 | color green "\<(alarm|auto_load_pkg|bsearch|catclose|catgets|catopen|ccollate|cconcat|cequal|chgrp|chmod|chown|chroot|cindex|clength|cmdtrace|commandloop|crange|csubstr|ctoken|ctype|dup|echo|execl|fcntl|flock|fork|fstat|ftruncate|funlock|host_info|id|infox|keyldel|keylget|keylkeys|keylset|kill|lassign|lcontain|lempty|lgets|link|lmatch|loadlibindex|loop|lvarcat|lvarpop|lvarpush|max|min|nice|pipe|profile|random|readdir|replicate|scancontext|scanfile|scanmatch|select|server_accept|server_create|signal|sleep|sync|system|tclx_findinit|tclx_fork|tclx_load_tndxs|tclx_sleep|tclx_system|tclx_wait|times|translit|try_eval|umask|wait)\>" |
Benno Schulenberg | c4b344f | 2014-02-23 16:07:44 +0000 | [diff] [blame] | 13 | # Syntax: |
Chris Allegretta | 90ee8ee | 2008-03-20 04:45:55 +0000 | [diff] [blame] | 14 | color brightblue "proc[[:space:]]" "(\{|\})" |
| 15 | color green "(\(|\)|\;|`|\\|\$|<|>|!|=|&|\|)" |
| 16 | color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" |
| 17 | icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" |
| 18 | color ,green "[[:space:]]+$" |
Chris Allegretta | 308a7b0 | 2009-08-18 02:55:22 +0000 | [diff] [blame] | 19 | color ,magenta "^[[:space:]]*#.*" |