annotate runtime/syntax/tcl.vim @ 844:d3bbb5dd3913 v7.0f02

updated for version 7.0f02
author vimboss
date Thu, 27 Apr 2006 00:02:13 +0000
parents 3fc0f57ecb91
children 96cd8222a819
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: TCL/TK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Dean Copsey <copsey@cs.ucdavis.edu>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " (previously Matt Neumann <mattneu@purpleturtle.com>)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " (previously Allan Kelly <allan@fruitloaf.co.uk>)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Original: Robin Becker <robin@jessikat.demon.co.uk>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Last Change: 2004 May 16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Keywords TODO: format clock click anchor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " A bunch of useful keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword tclStatement proc global return lindex
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword tclStatement llength lappend lreplace lrange list concat incr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword tclStatement upvar set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword tclLabel case default
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword tclConditional if then else elseif switch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword tclRepeat while for foreach break continue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword tcltkSwitch contained insert create polygon fill outline tag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " WIDGETS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " commands associated with widgets
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword tcltkWidgetSwitch contained background highlightbackground insertontime cget
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword tcltkWidgetSwitch contained selectborderwidth borderwidth highlightcolor insertwidth
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword tcltkWidgetSwitch contained selectforeground cursor highlightthickness padx setgrid
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword tcltkWidgetSwitch contained exportselection insertbackground pady takefocus
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword tcltkWidgetSwitch contained font insertborderwidth relief xscrollcommand
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword tcltkWidgetSwitch contained foreground insertofftime selectbackground yscrollcommand
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword tcltkWidgetSwitch contained height spacing1 spacing2 spacing3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword tcltkWidgetSwitch contained state tabs width wrap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " button
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword tcltkWidgetSwitch contained command default
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " canvas
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword tcltkWidgetSwitch contained closeenough confine scrollregion xscrollincrement yscrollincrement orient
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " checkbutton, radiobutton
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword tcltkWidgetSwitch contained indicatoron offvalue onvalue selectcolor selectimage state variable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " entry, frame
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword tcltkWidgetSwitch contained show class colormap container visual
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " listbox, menu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword tcltkWidgetSwitch contained selectmode postcommand selectcolor tearoff tearoffcommand title type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " menubutton, message
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword tcltkWidgetSwitch contained direction aspect justify
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " scale
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword tcltkWidgetSwitch contained bigincrement digits from length resolution showvalue sliderlength sliderrelief tickinterval to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " scrollbar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword tcltkWidgetSwitch contained activerelief elementborderwidth
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " image
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword tcltkWidgetSwitch contained delete names types create
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " variable reference
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " ::optional::namespaces
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match tclVarRef "$\(\(::\)\?\([[:alnum:]_.]*::\)*\)\a[a-zA-Z0-9_.]*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " ${...} may contain any character except '}'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match tclVarRef "${[^}]*}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " menu, mane add
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword tcltkWidgetSwitch contained active end last none cascade checkbutton command radiobutton separator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword tcltkWidgetSwitch contained activebackground actveforeground accelerator background bitmap columnbreak
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword tcltkWidgetSwitch contained font foreground hidemargin image indicatoron label menu offvalue onvalue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword tcltkWidgetSwitch contained selectcolor selectimage state underline value variable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword tcltkWidgetSwitch contained add clone configure delete entrycget entryconfigure index insert invoke
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword tcltkWidgetSwitch contained post postcascade type unpost yposition activate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 "syn keyword tcltkWidgetSwitch contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 "syn match tcltkWidgetSwitch contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<button\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<scale\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<canvas\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<checkbutton\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<entry\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<frame\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<image\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<listbox\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<menubutton\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<message\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<radiobutton\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<scrollbar\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 " These words are dual purpose.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " match switches
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 "syn match tcltkWidgetSwitch contained "-text"hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match tcltkWidgetSwitch contained "-text\(var\)\?"hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match tcltkWidgetSwitch contained "-menu"hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match tcltkWidgetSwitch contained "-label"hs=s+1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 " match commands - 2 lines for pretty match.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 "variable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 " Special case - If a number follows a variable region, it must be at the end of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 " the pattern, by definition. Therefore, (1) either include a number as the region
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 " end and exclude tclNumber from the contains list, or (2) make variable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 " keepend. As (1) would put variable out of step with everything else, use (2).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn region tcltkCommand matchgroup=tcltkCommandColor start="^\<variable\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tclString,tclNumber,tclVarRef,tcltkCommand
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn region tcltkCommand matchgroup=tcltkCommandColor start="\s\<variable\>\|\[\<variable\>"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tclString,tclNumber,tclVarRef,tcltkCommand
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 " menu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\<menu\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\s\<menu\>\|\[\<menu\>"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 " label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\<label\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\s\<label\>\|\[\<label\>"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 " text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\<text\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidget,tcltkWidgetSwitch,tcltkSwitch,tclNumber,tclVarRef,tclString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\s\<text\>\|\[\<text\>"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidget,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 " This isn't contained (I don't think) so it's OK to just associate with the Color group.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 " TODO: This could be wrong.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn keyword tcltkWidgetColor toplevel
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn region tcltkPackConf matchgroup=tcltkPackConfColor start="\<configure\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tcltkPackConfSwitch,tclNumber,tclVarRef keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn region tcltkPackConf matchgroup=tcltkPackConfColor start="\<cget\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tcltkPackConfSwitch,tclNumber,tclVarRef
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 " NAMESPACE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 " commands associated with namespace
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn keyword tcltkNamespaceSwitch contained children code current delete eval
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn keyword tcltkNamespaceSwitch contained export forget import inscope origin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn keyword tcltkNamespaceSwitch contained parent qualifiers tail which command variable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn region tcltkCommand matchgroup=tcltkCommandColor start="\<namespace\>" matchgroup=NONE skip="^\s*$" end="{\|}\|]\|\"\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkNamespaceSwitch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 " EXPR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 " commands associated with expr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 syn keyword tcltkMaths contained acos cos hypot sinh
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn keyword tcltkMaths contained asin cosh log sqrt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn keyword tcltkMaths contained atan exp log10 tan
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 syn keyword tcltkMaths contained atan2 floor pow tanh
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 syn keyword tcltkMaths contained ceil fmod sin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 syn region tcltkCommand matchgroup=tcltkCommandColor start="\<expr\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkMaths,tclNumber,tclVarRef,tclString,tcltlWidgetSwitch,tcltkCommand,tcltkPackConf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 " format
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 syn region tcltkCommand matchgroup=tcltkCommandColor start="\<format\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkMaths,tclNumber,tclVarRef,tclString,tcltlWidgetSwitch,tcltkCommand,tcltkPackConf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 " PACK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 " commands associated with pack
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 syn keyword tcltkPackSwitch contained forget info propogate slaves
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 syn keyword tcltkPackConfSwitch contained after anchor before expand fill in ipadx ipady padx pady side
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 syn region tcltkCommand matchgroup=tcltkCommandColor start="\<pack\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkPackSwitch,tcltkPackConf,tcltkPackConfSwitch,tclNumber,tclVarRef,tclString,tcltkCommand keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 " STRING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 " commands associated with string
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 syn keyword tcltkStringSwitch contained compare first index last length match range tolower toupper trim trimleft trimright wordstart wordend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 syn region tcltkCommand matchgroup=tcltkCommandColor start="\<string\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkStringSwitch,tclNumber,tclVarRef,tclString,tcltkCommand
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 " ARRAY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 " commands associated with array
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 syn keyword tcltkArraySwitch contained anymore donesearch exists get names nextelement size startsearch set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 " match from command name to ] or EOL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 syn region tcltkCommand matchgroup=tcltkCommandColor start="\<array\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkArraySwitch,tclNumber,tclVarRef,tclString,tcltkCommand
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 " LSORT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 " switches for lsort
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 syn keyword tcltkLsortSwitch contained ascii dictionary integer real command increasing decreasing index
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 " match from command name to ] or EOL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 syn region tcltkCommand matchgroup=tcltkCommandColor start="\<lsort\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkLsortSwitch,tclNumber,tclVarRef,tclString,tcltkCommand
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 syn keyword tclTodo contained TODO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 " String and Character contstants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 " Highlight special characters (those which have a backslash) differently
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 syn match tclSpecial contained "\\\d\d\d\=\|\\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 " A string needs the skip argument as it may legitimately contain \".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 " Match at start of line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 syn region tclString start=+^"+ end=+"+ contains=tclSpecial skip=+\\\\\|\\"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 "Match all other legal strings.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=tclSpecial skip=+\\\\\|\\"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 syn match tclLineContinue "\\\s*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 "integer number, or floating point number without a dot and with "f".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 syn match tclNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 "floating point number, with dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 syn match tclNumber "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 "floating point number, starting with a dot, optional exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 syn match tclNumber "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 "floating point number, without dot, with exponent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 syn match tclNumber "\<\d\+e[-+]\=\d\+[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 "hex number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 syn match tclNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 "syn match tclIdentifier "\<[a-z_][a-z0-9_]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 syn region tclComment start="^\s*\#" skip="\\$" end="$" contains=tclTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 "syn sync ccomment tclComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 if version >= 508 || !exists("did_tcl_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 let did_tcl_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 HiLink tcltkSwitch Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 HiLink tclLabel Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 HiLink tclConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 HiLink tclRepeat Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 HiLink tclNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 HiLink tclError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 HiLink tclStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 "HiLink tclStatementColor Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 HiLink tclString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 HiLink tclComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 HiLink tclSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 HiLink tclTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 " Below here are the commands and their options.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 HiLink tcltkCommandColor Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 HiLink tcltkWidgetColor Structure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 HiLink tclLineContinue WarningMsg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 HiLink tcltkStringSwitch Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 HiLink tcltkArraySwitch Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 HiLink tcltkLsortSwitch Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 HiLink tcltkPackSwitch Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 HiLink tcltkPackConfSwitch Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 HiLink tcltkMaths Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 HiLink tcltkNamespaceSwitch Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 HiLink tcltkWidgetSwitch Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 HiLink tcltkPackConfColor Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 "HiLink tcltkLsort Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 HiLink tclVarRef Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 let b:current_syntax = "tcl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 " vim: ts=8