tweaks: reshuffle a comment, and put the main extension first

And add some air to the compact file.
master
Benno Schulenberg 2021-04-05 16:06:54 +02:00
parent 682a088fb8
commit c3cdb099da
1 changed files with 7 additions and 3 deletions

View File

@ -1,23 +1,27 @@
## Syntax highlighting for Tcl files. ## Syntax highlighting for Tcl and Expect scripts.
# Handle expect & TCL scripts. syntax tcl "\.(tcl|exp)$"
syntax tcl "\.(exp|tcl)$"
magic "Tcl(/Tk)? script" magic "Tcl(/Tk)? script"
comment "#" comment "#"
# Standard Tcl [info commands]: # Standard Tcl [info commands]:
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)\>" 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)\>"
# Basic Tcl subcommands: # Basic Tcl subcommands:
color green "\<array (anymore|donesearch|exists|get|names|nextelement|set|size|startsearch|statistics|unset)\>" color green "\<array (anymore|donesearch|exists|get|names|nextelement|set|size|startsearch|statistics|unset)\>"
color green "\<string (bytelength|compare|equal|first|index|is|last|length|map|match|range|repeat|replace|to|tolower|totitle|toupper|trim|trimleft|trimright|will|wordend|wordstart)\>" color green "\<string (bytelength|compare|equal|first|index|is|last|length|map|match|range|repeat|replace|to|tolower|totitle|toupper|trim|trimleft|trimright|will|wordend|wordstart)\>"
# Extended TclX [info commands]: # Extended TclX [info commands]:
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)\>" 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)\>"
# Syntax: # Syntax:
color brightblue "\<proc[[:space:]]|\{|\}" color brightblue "\<proc[[:space:]]|\{|\}"
color green "\(|\)|\;|`|\\|\$|<|>|!|=|&|\|" color green "\(|\)|\;|`|\\|\$|<|>|!|=|&|\|"
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
color brightred "\$\{?[0-9A-Za-z_!@#$*?-]+\}?" color brightred "\$\{?[0-9A-Za-z_!@#$*?-]+\}?"
# Trailing whitespace: # Trailing whitespace:
color ,green "[[:space:]]+$" color ,green "[[:space:]]+$"
# Comments: # Comments:
color cyan "^[[:space:]]*#.*" color cyan "^[[:space:]]*#.*"