comparison runtime/syntax/tcl.vim @ 5692:80e5f9584b02

Update runtime files. Add Euphoria syntax files.
author Bram Moolenaar <bram@vim.org>
date Mon, 24 Feb 2014 02:51:51 +0100
parents 7bc41231fbc7
children 43efa4f5a8ea
comparison
equal deleted inserted replaced
5691:a073747c2a1e 5692:80e5f9584b02
4 " (previously Brett Cannon <brett@python.org>) 4 " (previously Brett Cannon <brett@python.org>)
5 " (previously Dean Copsey <copsey@cs.ucdavis.edu>) 5 " (previously Dean Copsey <copsey@cs.ucdavis.edu>)
6 " (previously Matt Neumann <mattneu@purpleturtle.com>) 6 " (previously Matt Neumann <mattneu@purpleturtle.com>)
7 " (previously Allan Kelly <allan@fruitloaf.co.uk>) 7 " (previously Allan Kelly <allan@fruitloaf.co.uk>)
8 " Original: Robin Becker <robin@jessikat.demon.co.uk> 8 " Original: Robin Becker <robin@jessikat.demon.co.uk>
9 " Last Change: 2009/04/06 02:38:36 9 " Last Change: 2014-02-12
10 " Version: 1.13 10 " Version: 1.14
11 " URL: http://real.metasyntax.net:2357/cvs/cvsweb.cgi/Config/vim/syntax/tcl.vim 11 " URL: http://bitbucket.org/taylor_venable/metasyntax/src/tip/Config/vim/syntax/tcl.vim
12 "
13 " Keywords TODO: click anchor
14 12
15 " For version 5.x: Clear all syntax items 13 " For version 5.x: Clear all syntax items
16 " For version 6.x: Quit when a syntax file was already loaded 14 " For version 6.x: Quit when a syntax file was already loaded
17 if version < 600 15 if version < 600
18 syntax clear 16 syntax clear
19 elseif exists("b:current_syntax") 17 elseif exists("b:current_syntax")
20 finish 18 finish
21 endif 19 endif
22 20
23 " Basic Tcl commands: http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm 21 " Basic Tcl commands: http://www.tcl.tk/man/tcl8.6/TclCmd/contents.htm
24 syn keyword tclCommand after append apply array bgerror binary catch cd chan clock 22 syn keyword tclCommand after append array bgerror binary cd chan clock close concat
25 syn keyword tclCommand close concat dde dict encoding eof error eval exec exit 23 syn keyword tclCommand dde dict encoding eof error eval exec exit expr fblocked
26 syn keyword tclCommand expr fblocked fconfigure fcopy file fileevent filename flush 24 syn keyword tclCommand fconfigure fcopy file fileevent flush format gets glob
27 syn keyword tclCommand format gets glob global history incr info interp join 25 syn keyword tclCommand global history http incr info interp join lappend lassign
28 syn keyword tclCommand lappend lassign lindex linsert list llength load lrange lrepeat 26 syn keyword tclCommand lindex linsert list llength lmap load lrange lrepeat
29 syn keyword tclCommand lreplace lreverse lsearch lset lsort memory namespace open package 27 syn keyword tclCommand lreplace lreverse lsearch lset lsort memory my namespace
30 syn keyword tclCommand pid proc puts pwd read regexp registry regsub rename return 28 syn keyword tclCommand next nextto open package pid puts pwd read refchan regexp
31 syn keyword tclCommand scan seek set socket source split string subst tell time 29 syn keyword tclCommand registry regsub rename scan seek self set socket source
32 syn keyword tclCommand trace unknown unload unset update uplevel upvar variable vwait 30 syn keyword tclCommand split string subst tell time trace unknown unload unset
33 31 syn keyword tclCommand update uplevel upvar variable vwait
34 " The 'Tcl Standard Library' commands: http://www.tcl.tk/man/tcl8.5/TclCmd/library.htm 32
35 syn keyword tclCommand auto_execok auto_import auto_load auto_mkindex auto_mkindex_old 33 " The 'Tcl Standard Library' commands: http://www.tcl.tk/man/tcl8.6/TclCmd/library.htm
36 syn keyword tclCommand auto_qualify auto_reset parray tcl_endOfWord tcl_findLibrary 34 syn keyword tclCommand auto_execok auto_import auto_load auto_mkindex auto_reset
37 syn keyword tclCommand tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter 35 syn keyword tclCommand auto_qualify tcl_findLibrary parray tcl_endOfWord
38 syn keyword tclCommand tcl_wordBreakBefore 36 syn keyword tclCommand tcl_startOfNextWord tcl_startOfPreviousWord
39 37 syn keyword tclCommand tcl_wordBreakAfter tcl_wordBreakBefore
40 " Commands that were added in Tcl 8.6 38
41 39 " Global variables used by Tcl: http://www.tcl.tk/man/tcl8.6/TclCmd/tclvars.htm
42 syn keyword tclCommand my oo::copy oo::define oo::objdefine self 40 syn keyword tclVars auto_path env errorCode errorInfo tcl_library tcl_patchLevel
43 syn keyword tclCommand coroutine tailcall throw yield 41 syn keyword tclVars tcl_pkgPath tcl_platform tcl_precision tcl_rcFileName
44 42 syn keyword tclVars tcl_traceCompile tcl_traceExec tcl_wordchars
45 " Global variables used by Tcl: http://www.tcl.tk/man/tcl8.5/TclCmd/tclvars.htm 43 syn keyword tclVars tcl_nonwordchars tcl_version argc argv argv0 tcl_interactive
46 syn keyword tclVars env errorCode errorInfo tcl_library tcl_patchLevel tcl_pkgPath
47 syn keyword tclVars tcl_platform tcl_precision tcl_rcFileName tcl_traceCompile
48 syn keyword tclVars tcl_traceExec tcl_wordchars tcl_nonwordchars tcl_version argc argv
49 syn keyword tclVars argv0 tcl_interactive geometry
50 44
51 " Strings which expr accepts as boolean values, aside from zero / non-zero. 45 " Strings which expr accepts as boolean values, aside from zero / non-zero.
52 syn keyword tclBoolean true false on off yes no 46 syn keyword tclBoolean true false on off yes no
53 47
54 syn keyword tclLabel case default 48 syn keyword tclProcCommand apply coroutine proc return tailcall yield yieldto
55 syn keyword tclConditional if then else elseif switch 49 syn keyword tclConditional if then else elseif switch
56 syn keyword tclConditional try finally 50 syn keyword tclConditional catch try throw finally
51 syn keyword tclLabel default
57 syn keyword tclRepeat while for foreach break continue 52 syn keyword tclRepeat while for foreach break continue
53
58 syn keyword tcltkSwitch contained insert create polygon fill outline tag 54 syn keyword tcltkSwitch contained insert create polygon fill outline tag
59 55
60 " WIDGETS 56 " WIDGETS
61 " commands associated with widgets 57 " commands associated with widgets
62 syn keyword tcltkWidgetSwitch contained background highlightbackground insertontime cget 58 syn keyword tcltkWidgetSwitch contained background highlightbackground insertontime cget
89 " ::optional::namespaces 85 " ::optional::namespaces
90 syn match tclVarRef "$\(\(::\)\?\([[:alnum:]_]*::\)*\)\a[[:alnum:]_]*" 86 syn match tclVarRef "$\(\(::\)\?\([[:alnum:]_]*::\)*\)\a[[:alnum:]_]*"
91 " ${...} may contain any character except '}' 87 " ${...} may contain any character except '}'
92 syn match tclVarRef "${[^}]*}" 88 syn match tclVarRef "${[^}]*}"
93 89
90 " Used to facilitate hack to utilize string background for certain color
91 " schemes, e.g. inkpot and lettuce.
92 syn cluster tclVarRefC add=tclVarRef
93 syn cluster tclSpecialC add=tclSpecial
94
94 " The syntactic unquote-splicing replacement for [expand]. 95 " The syntactic unquote-splicing replacement for [expand].
95 syn match tclExpand '\s{\*}' 96 syn match tclExpand '\s{\*}'
96 syn match tclExpand '^{\*}' 97 syn match tclExpand '^{\*}'
97 98
98 " menu, mane add 99 " menu, mane add
201 202
202 " Command appearing inside another command or inside a string. 203 " Command appearing inside another command or inside a string.
203 syn region tclEmbeddedStatement start='\[' end='\]' contained contains=tclCommand,tclNumber,tclLineContinue,tclString,tclVarRef,tclEmbeddedStatement 204 syn region tclEmbeddedStatement start='\[' end='\]' contained contains=tclCommand,tclNumber,tclLineContinue,tclString,tclVarRef,tclEmbeddedStatement
204 " A string needs the skip argument as it may legitimately contain \". 205 " A string needs the skip argument as it may legitimately contain \".
205 " Match at start of line 206 " Match at start of line
206 syn region tclString start=+^"+ end=+"+ contains=tclSpecial skip=+\\\\\|\\"+ 207 syn region tclString start=+^"+ end=+"+ contains=@tclSpecialC skip=+\\\\\|\\"+
207 "Match all other legal strings. 208 "Match all other legal strings.
208 syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=tclSpecial,tclVarRef,tclEmbeddedStatement skip=+\\\\\|\\"+ 209 syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=@tclSpecialC,@tclVarRefC,tclEmbeddedStatement skip=+\\\\\|\\"+
209 210
210 " Line continuation is backslash immediately followed by newline. 211 " Line continuation is backslash immediately followed by newline.
211 syn match tclLineContinue '\\$' 212 syn match tclLineContinue '\\$'
212 213
213 if exists('g:tcl_warn_continuation') 214 if exists('g:tcl_warn_continuation')
229 syn case match 230 syn case match
230 231
231 syn region tclComment start="^\s*\#" skip="\\$" end="$" contains=tclTodo 232 syn region tclComment start="^\s*\#" skip="\\$" end="$" contains=tclTodo
232 syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo 233 syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo
233 234
235 "syn match tclComment /^\s*\#.*$/
236 "syn match tclComment /;\s*\#.*$/hs=s+1
237
234 "syn sync ccomment tclComment 238 "syn sync ccomment tclComment
235 239
236 " Define the default highlighting. 240 " Define the default highlighting.
237 " For version 5.7 and earlier: only when not done already 241 " For version 5.7 and earlier: only when not done already
238 " For version 5.8 and later: only when an item doesn't have highlighting yet 242 " For version 5.8 and later: only when an item doesn't have highlighting yet
250 HiLink tclConditional Conditional 254 HiLink tclConditional Conditional
251 HiLink tclRepeat Repeat 255 HiLink tclRepeat Repeat
252 HiLink tclNumber Number 256 HiLink tclNumber Number
253 HiLink tclError Error 257 HiLink tclError Error
254 HiLink tclCommand Statement 258 HiLink tclCommand Statement
259 HiLink tclProcCommand Type
255 HiLink tclString String 260 HiLink tclString String
256 HiLink tclComment Comment 261 HiLink tclComment Comment
257 HiLink tclSpecial Special 262 HiLink tclSpecial Special
258 HiLink tclTodo Todo 263 HiLink tclTodo Todo
259 " Below here are the commands and their options. 264 " Below here are the commands and their options.
277 delcommand HiLink 282 delcommand HiLink
278 endif 283 endif
279 284
280 let b:current_syntax = "tcl" 285 let b:current_syntax = "tcl"
281 286
282 " vim: ts=8 noet 287 " vim: ts=8 noet nolist