Mercurial > vim
annotate runtime/syntax/tcl.vim @ 13946:c2312fc9fbfe v8.0.1843
patch 8.0.1843: entry for 'wrap' in options window is wrong
commit https://github.com/vim/vim/commit/8776889b5befd8eba66f4ad32282db36f85392a6
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue May 15 21:42:51 2018 +0200
patch 8.0.1843: entry for 'wrap' in options window is wrong
Problem: Entry for 'wrap' in options window is wrong. (John Little)
Solution: Make the change apply locally.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 15 May 2018 21:45:06 +0200 |
parents | 46763b01cd9a |
children | 11b656e74444 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2034 | 2 " Language: Tcl/Tk |
3 " Maintainer: Taylor Venable <taylor@metasyntax.net> | |
4 " (previously Brett Cannon <brett@python.org>) | |
1125 | 5 " (previously Dean Copsey <copsey@cs.ucdavis.edu>) |
7 | 6 " (previously Matt Neumann <mattneu@purpleturtle.com>) |
7 " (previously Allan Kelly <allan@fruitloaf.co.uk>) | |
8 " Original: Robin Becker <robin@jessikat.demon.co.uk> | |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
9 " Last Change: 2014-02-12 |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
10 " Version: 1.14 |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
11 " URL: http://bitbucket.org/taylor_venable/metasyntax/src/tip/Config/vim/syntax/tcl.vim |
7 | 12 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5692
diff
changeset
|
13 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5692
diff
changeset
|
14 if exists("b:current_syntax") |
7 | 15 finish |
16 endif | |
17 | |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
18 " Basic Tcl commands: http://www.tcl.tk/man/tcl8.6/TclCmd/contents.htm |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
19 syn keyword tclCommand after append array bgerror binary cd chan clock close concat |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
20 syn keyword tclCommand dde dict encoding eof error eval exec exit expr fblocked |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
21 syn keyword tclCommand fconfigure fcopy file fileevent flush format gets glob |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
22 syn keyword tclCommand global history http incr info interp join lappend lassign |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
23 syn keyword tclCommand lindex linsert list llength lmap load lrange lrepeat |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
24 syn keyword tclCommand lreplace lreverse lsearch lset lsort memory my namespace |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
25 syn keyword tclCommand next nextto open package pid puts pwd read refchan regexp |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
26 syn keyword tclCommand registry regsub rename scan seek self set socket source |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
27 syn keyword tclCommand split string subst tell time trace unknown unload unset |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
28 syn keyword tclCommand update uplevel upvar variable vwait |
2034 | 29 |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
30 " The 'Tcl Standard Library' commands: http://www.tcl.tk/man/tcl8.6/TclCmd/library.htm |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
31 syn keyword tclCommand auto_execok auto_import auto_load auto_mkindex auto_reset |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
32 syn keyword tclCommand auto_qualify tcl_findLibrary parray tcl_endOfWord |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
33 syn keyword tclCommand tcl_startOfNextWord tcl_startOfPreviousWord |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
34 syn keyword tclCommand tcl_wordBreakAfter tcl_wordBreakBefore |
2034 | 35 |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
36 " Global variables used by Tcl: http://www.tcl.tk/man/tcl8.6/TclCmd/tclvars.htm |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
37 syn keyword tclVars auto_path env errorCode errorInfo tcl_library tcl_patchLevel |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
38 syn keyword tclVars tcl_pkgPath tcl_platform tcl_precision tcl_rcFileName |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
39 syn keyword tclVars tcl_traceCompile tcl_traceExec tcl_wordchars |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
40 syn keyword tclVars tcl_nonwordchars tcl_version argc argv argv0 tcl_interactive |
2034 | 41 |
42 " Strings which expr accepts as boolean values, aside from zero / non-zero. | |
43 syn keyword tclBoolean true false on off yes no | |
44 | |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
45 syn keyword tclProcCommand apply coroutine proc return tailcall yield yieldto |
7 | 46 syn keyword tclConditional if then else elseif switch |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
47 syn keyword tclConditional catch try throw finally |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
48 syn keyword tclLabel default |
7 | 49 syn keyword tclRepeat while for foreach break continue |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
50 |
7 | 51 syn keyword tcltkSwitch contained insert create polygon fill outline tag |
52 | |
53 " WIDGETS | |
54 " commands associated with widgets | |
55 syn keyword tcltkWidgetSwitch contained background highlightbackground insertontime cget | |
56 syn keyword tcltkWidgetSwitch contained selectborderwidth borderwidth highlightcolor insertwidth | |
57 syn keyword tcltkWidgetSwitch contained selectforeground cursor highlightthickness padx setgrid | |
58 syn keyword tcltkWidgetSwitch contained exportselection insertbackground pady takefocus | |
59 syn keyword tcltkWidgetSwitch contained font insertborderwidth relief xscrollcommand | |
60 syn keyword tcltkWidgetSwitch contained foreground insertofftime selectbackground yscrollcommand | |
61 syn keyword tcltkWidgetSwitch contained height spacing1 spacing2 spacing3 | |
62 syn keyword tcltkWidgetSwitch contained state tabs width wrap | |
63 " button | |
64 syn keyword tcltkWidgetSwitch contained command default | |
65 " canvas | |
66 syn keyword tcltkWidgetSwitch contained closeenough confine scrollregion xscrollincrement yscrollincrement orient | |
67 " checkbutton, radiobutton | |
68 syn keyword tcltkWidgetSwitch contained indicatoron offvalue onvalue selectcolor selectimage state variable | |
69 " entry, frame | |
70 syn keyword tcltkWidgetSwitch contained show class colormap container visual | |
71 " listbox, menu | |
72 syn keyword tcltkWidgetSwitch contained selectmode postcommand selectcolor tearoff tearoffcommand title type | |
73 " menubutton, message | |
74 syn keyword tcltkWidgetSwitch contained direction aspect justify | |
75 " scale | |
76 syn keyword tcltkWidgetSwitch contained bigincrement digits from length resolution showvalue sliderlength sliderrelief tickinterval to | |
77 " scrollbar | |
78 syn keyword tcltkWidgetSwitch contained activerelief elementborderwidth | |
79 " image | |
80 syn keyword tcltkWidgetSwitch contained delete names types create | |
81 " variable reference | |
82 " ::optional::namespaces | |
2034 | 83 syn match tclVarRef "$\(\(::\)\?\([[:alnum:]_]*::\)*\)\a[[:alnum:]_]*" |
7 | 84 " ${...} may contain any character except '}' |
85 syn match tclVarRef "${[^}]*}" | |
2034 | 86 |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
87 " Used to facilitate hack to utilize string background for certain color |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
88 " schemes, e.g. inkpot and lettuce. |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
89 syn cluster tclVarRefC add=tclVarRef |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
90 syn cluster tclSpecialC add=tclSpecial |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
91 |
2034 | 92 " The syntactic unquote-splicing replacement for [expand]. |
93 syn match tclExpand '\s{\*}' | |
94 syn match tclExpand '^{\*}' | |
95 | |
7 | 96 " menu, mane add |
97 syn keyword tcltkWidgetSwitch contained active end last none cascade checkbutton command radiobutton separator | |
98 syn keyword tcltkWidgetSwitch contained activebackground actveforeground accelerator background bitmap columnbreak | |
99 syn keyword tcltkWidgetSwitch contained font foreground hidemargin image indicatoron label menu offvalue onvalue | |
100 syn keyword tcltkWidgetSwitch contained selectcolor selectimage state underline value variable | |
101 syn keyword tcltkWidgetSwitch contained add clone configure delete entrycget entryconfigure index insert invoke | |
102 syn keyword tcltkWidgetSwitch contained post postcascade type unpost yposition activate | |
103 "syn keyword tcltkWidgetSwitch contained | |
104 "syn match tcltkWidgetSwitch contained | |
105 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<button\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
106 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<scale\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
107 | |
108 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<canvas\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
109 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<checkbutton\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
110 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<entry\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
111 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<frame\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
112 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<image\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
113 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<listbox\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
114 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<menubutton\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
115 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<message\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
116 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<radiobutton\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
117 syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<scrollbar\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
118 " These words are dual purpose. | |
119 " match switches | |
120 "syn match tcltkWidgetSwitch contained "-text"hs=s+1 | |
121 syn match tcltkWidgetSwitch contained "-text\(var\)\?"hs=s+1 | |
122 syn match tcltkWidgetSwitch contained "-menu"hs=s+1 | |
123 syn match tcltkWidgetSwitch contained "-label"hs=s+1 | |
124 " match commands - 2 lines for pretty match. | |
125 "variable | |
126 " Special case - If a number follows a variable region, it must be at the end of | |
127 " the pattern, by definition. Therefore, (1) either include a number as the region | |
128 " end and exclude tclNumber from the contains list, or (2) make variable | |
129 " keepend. As (1) would put variable out of step with everything else, use (2). | |
130 syn region tcltkCommand matchgroup=tcltkCommandColor start="^\<variable\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tclString,tclNumber,tclVarRef,tcltkCommand | |
131 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 | |
132 " menu | |
133 syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\<menu\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
134 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 | |
135 " label | |
136 syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\<label\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef | |
137 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 | |
138 " text | |
139 syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\<text\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidget,tcltkWidgetSwitch,tcltkSwitch,tclNumber,tclVarRef,tclString | |
140 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 | |
141 | |
142 " This isn't contained (I don't think) so it's OK to just associate with the Color group. | |
143 " TODO: This could be wrong. | |
144 syn keyword tcltkWidgetColor toplevel | |
145 | |
146 | |
147 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 | |
148 syn region tcltkPackConf matchgroup=tcltkPackConfColor start="\<cget\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tcltkPackConfSwitch,tclNumber,tclVarRef | |
149 | |
150 | |
151 " NAMESPACE | |
152 " commands associated with namespace | |
153 syn keyword tcltkNamespaceSwitch contained children code current delete eval | |
154 syn keyword tcltkNamespaceSwitch contained export forget import inscope origin | |
155 syn keyword tcltkNamespaceSwitch contained parent qualifiers tail which command variable | |
156 syn region tcltkCommand matchgroup=tcltkCommandColor start="\<namespace\>" matchgroup=NONE skip="^\s*$" end="{\|}\|]\|\"\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkNamespaceSwitch | |
157 | |
158 " EXPR | |
159 " commands associated with expr | |
2034 | 160 syn keyword tcltkMaths contained abs acos asin atan atan2 bool ceil cos cosh double entier |
161 syn keyword tcltkMaths contained exp floor fmod hypot int isqrt log log10 max min pow rand | |
162 syn keyword tcltkMaths contained round sin sinh sqrt srand tan tanh wide | |
163 | |
7 | 164 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 |
165 | |
166 " format | |
167 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 | |
168 | |
169 " PACK | |
170 " commands associated with pack | |
171 syn keyword tcltkPackSwitch contained forget info propogate slaves | |
172 syn keyword tcltkPackConfSwitch contained after anchor before expand fill in ipadx ipady padx pady side | |
173 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 | |
174 | |
175 " STRING | |
176 " commands associated with string | |
177 syn keyword tcltkStringSwitch contained compare first index last length match range tolower toupper trim trimleft trimright wordstart wordend | |
178 syn region tcltkCommand matchgroup=tcltkCommandColor start="\<string\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkStringSwitch,tclNumber,tclVarRef,tclString,tcltkCommand | |
179 | |
180 " ARRAY | |
181 " commands associated with array | |
182 syn keyword tcltkArraySwitch contained anymore donesearch exists get names nextelement size startsearch set | |
183 " match from command name to ] or EOL | |
184 syn region tcltkCommand matchgroup=tcltkCommandColor start="\<array\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkArraySwitch,tclNumber,tclVarRef,tclString,tcltkCommand | |
185 | |
186 " LSORT | |
187 " switches for lsort | |
188 syn keyword tcltkLsortSwitch contained ascii dictionary integer real command increasing decreasing index | |
189 " match from command name to ] or EOL | |
190 syn region tcltkCommand matchgroup=tcltkCommandColor start="\<lsort\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkLsortSwitch,tclNumber,tclVarRef,tclString,tcltkCommand | |
191 | |
192 syn keyword tclTodo contained TODO | |
193 | |
2034 | 194 " Sequences which are backslash-escaped: http://www.tcl.tk/man/tcl8.5/TclCmd/Tcl.htm#M16 |
195 " Octal, hexadecimal, unicode codepoints, and the classics. | |
196 " Tcl takes as many valid characters in a row as it can, so \xAZ in a string is newline followed by 'Z'. | |
197 syn match tclSpecial contained '\\\([0-7]\{1,3}\|x\x\{1,2}\|u\x\{1,4}\|[abfnrtv]\)' | |
198 syn match tclSpecial contained '\\[\[\]\{\}\"\$]' | |
7 | 199 |
2034 | 200 " Command appearing inside another command or inside a string. |
201 syn region tclEmbeddedStatement start='\[' end='\]' contained contains=tclCommand,tclNumber,tclLineContinue,tclString,tclVarRef,tclEmbeddedStatement | |
7 | 202 " A string needs the skip argument as it may legitimately contain \". |
203 " Match at start of line | |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
204 syn region tclString start=+^"+ end=+"+ contains=@tclSpecialC skip=+\\\\\|\\"+ |
7 | 205 "Match all other legal strings. |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
206 syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=@tclSpecialC,@tclVarRefC,tclEmbeddedStatement skip=+\\\\\|\\"+ |
7 | 207 |
2034 | 208 " Line continuation is backslash immediately followed by newline. |
209 syn match tclLineContinue '\\$' | |
210 | |
211 if exists('g:tcl_warn_continuation') | |
212 syn match tclNotLineContinue '\\\s\+$' | |
213 endif | |
7 | 214 |
215 "integer number, or floating point number without a dot and with "f". | |
216 syn case ignore | |
217 syn match tclNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" | |
218 "floating point number, with dot, optional exponent | |
219 syn match tclNumber "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" | |
220 "floating point number, starting with a dot, optional exponent | |
221 syn match tclNumber "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" | |
222 "floating point number, without dot, with exponent | |
223 syn match tclNumber "\<\d\+e[-+]\=\d\+[fl]\=\>" | |
224 "hex number | |
225 syn match tclNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" | |
226 "syn match tclIdentifier "\<[a-z_][a-z0-9_]*\>" | |
227 syn case match | |
228 | |
229 syn region tclComment start="^\s*\#" skip="\\$" end="$" contains=tclTodo | |
230 syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo | |
231 | |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
232 "syn match tclComment /^\s*\#.*$/ |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
233 "syn match tclComment /;\s*\#.*$/hs=s+1 |
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
234 |
7 | 235 "syn sync ccomment tclComment |
236 | |
237 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5692
diff
changeset
|
238 " Only when an item doesn't have highlighting yet |
7 | 239 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
240 hi def link tcltkSwitch Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
241 hi def link tclExpand Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
242 hi def link tclLabel Label |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
243 hi def link tclConditional Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
244 hi def link tclRepeat Repeat |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
245 hi def link tclNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
246 hi def link tclError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
247 hi def link tclCommand Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
248 hi def link tclProcCommand Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
249 hi def link tclString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
250 hi def link tclComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
251 hi def link tclSpecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
252 hi def link tclTodo Todo |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5692
diff
changeset
|
253 " Below here are the commands and their options. |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
254 hi def link tcltkCommandColor Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
255 hi def link tcltkWidgetColor Structure |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
256 hi def link tclLineContinue WarningMsg |
2034 | 257 if exists('g:tcl_warn_continuation') |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
258 hi def link tclNotLineContinue ErrorMsg |
2034 | 259 endif |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
260 hi def link tcltkStringSwitch Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
261 hi def link tcltkArraySwitch Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
262 hi def link tcltkLsortSwitch Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
263 hi def link tcltkPackSwitch Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
264 hi def link tcltkPackConfSwitch Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
265 hi def link tcltkMaths Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
266 hi def link tcltkNamespaceSwitch Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
267 hi def link tcltkWidgetSwitch Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
268 hi def link tcltkPackConfColor Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
269 hi def link tclVarRef Identifier |
7 | 270 |
271 | |
272 let b:current_syntax = "tcl" | |
273 | |
5692
80e5f9584b02
Update runtime files. Add Euphoria syntax files.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
274 " vim: ts=8 noet nolist |