summaryrefslogtreecommitdiff
path: root/runtime/syntax/tcl.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-02-24 02:51:51 +0100
committerBram Moolenaar <Bram@vim.org>2014-02-24 02:51:51 +0100
commit251835e14f6fb4134a041c2ba9d3e7b84b783e86 (patch)
tree7cde7fafc2eb2735e0491f7fc085f27320b07d6e /runtime/syntax/tcl.vim
parent26df092843de91ea0c5c5c130d0d0695d2d81c07 (diff)
downloadvim-251835e14f6fb4134a041c2ba9d3e7b84b783e86.zip
Update runtime files. Add Euphoria syntax files.
Diffstat (limited to 'runtime/syntax/tcl.vim')
-rw-r--r--runtime/syntax/tcl.vim79
1 files changed, 42 insertions, 37 deletions
diff --git a/runtime/syntax/tcl.vim b/runtime/syntax/tcl.vim
index d15422daa..3c598267d 100644
--- a/runtime/syntax/tcl.vim
+++ b/runtime/syntax/tcl.vim
@@ -6,11 +6,9 @@
" (previously Matt Neumann <mattneu@purpleturtle.com>)
" (previously Allan Kelly <allan@fruitloaf.co.uk>)
" Original: Robin Becker <robin@jessikat.demon.co.uk>
-" Last Change: 2009/04/06 02:38:36
-" Version: 1.13
-" URL: http://real.metasyntax.net:2357/cvs/cvsweb.cgi/Config/vim/syntax/tcl.vim
-"
-" Keywords TODO: click anchor
+" Last Change: 2014-02-12
+" Version: 1.14
+" URL: http://bitbucket.org/taylor_venable/metasyntax/src/tip/Config/vim/syntax/tcl.vim
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -20,41 +18,39 @@ elseif exists("b:current_syntax")
finish
endif
-" Basic Tcl commands: http://www.tcl.tk/man/tcl8.5/TclCmd/contents.htm
-syn keyword tclCommand after append apply array bgerror binary catch cd chan clock
-syn keyword tclCommand close concat dde dict encoding eof error eval exec exit
-syn keyword tclCommand expr fblocked fconfigure fcopy file fileevent filename flush
-syn keyword tclCommand format gets glob global history incr info interp join
-syn keyword tclCommand lappend lassign lindex linsert list llength load lrange lrepeat
-syn keyword tclCommand lreplace lreverse lsearch lset lsort memory namespace open package
-syn keyword tclCommand pid proc puts pwd read regexp registry regsub rename return
-syn keyword tclCommand scan seek set socket source split string subst tell time
-syn keyword tclCommand trace unknown unload unset update uplevel upvar variable vwait
-
-" The 'Tcl Standard Library' commands: http://www.tcl.tk/man/tcl8.5/TclCmd/library.htm
-syn keyword tclCommand auto_execok auto_import auto_load auto_mkindex auto_mkindex_old
-syn keyword tclCommand auto_qualify auto_reset parray tcl_endOfWord tcl_findLibrary
-syn keyword tclCommand tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter
-syn keyword tclCommand tcl_wordBreakBefore
-
-" Commands that were added in Tcl 8.6
-
-syn keyword tclCommand my oo::copy oo::define oo::objdefine self
-syn keyword tclCommand coroutine tailcall throw yield
-
-" Global variables used by Tcl: http://www.tcl.tk/man/tcl8.5/TclCmd/tclvars.htm
-syn keyword tclVars env errorCode errorInfo tcl_library tcl_patchLevel tcl_pkgPath
-syn keyword tclVars tcl_platform tcl_precision tcl_rcFileName tcl_traceCompile
-syn keyword tclVars tcl_traceExec tcl_wordchars tcl_nonwordchars tcl_version argc argv
-syn keyword tclVars argv0 tcl_interactive geometry
+" Basic Tcl commands: http://www.tcl.tk/man/tcl8.6/TclCmd/contents.htm
+syn keyword tclCommand after append array bgerror binary cd chan clock close concat
+syn keyword tclCommand dde dict encoding eof error eval exec exit expr fblocked
+syn keyword tclCommand fconfigure fcopy file fileevent flush format gets glob
+syn keyword tclCommand global history http incr info interp join lappend lassign
+syn keyword tclCommand lindex linsert list llength lmap load lrange lrepeat
+syn keyword tclCommand lreplace lreverse lsearch lset lsort memory my namespace
+syn keyword tclCommand next nextto open package pid puts pwd read refchan regexp
+syn keyword tclCommand registry regsub rename scan seek self set socket source
+syn keyword tclCommand split string subst tell time trace unknown unload unset
+syn keyword tclCommand update uplevel upvar variable vwait
+
+" The 'Tcl Standard Library' commands: http://www.tcl.tk/man/tcl8.6/TclCmd/library.htm
+syn keyword tclCommand auto_execok auto_import auto_load auto_mkindex auto_reset
+syn keyword tclCommand auto_qualify tcl_findLibrary parray tcl_endOfWord
+syn keyword tclCommand tcl_startOfNextWord tcl_startOfPreviousWord
+syn keyword tclCommand tcl_wordBreakAfter tcl_wordBreakBefore
+
+" Global variables used by Tcl: http://www.tcl.tk/man/tcl8.6/TclCmd/tclvars.htm
+syn keyword tclVars auto_path env errorCode errorInfo tcl_library tcl_patchLevel
+syn keyword tclVars tcl_pkgPath tcl_platform tcl_precision tcl_rcFileName
+syn keyword tclVars tcl_traceCompile tcl_traceExec tcl_wordchars
+syn keyword tclVars tcl_nonwordchars tcl_version argc argv argv0 tcl_interactive
" Strings which expr accepts as boolean values, aside from zero / non-zero.
syn keyword tclBoolean true false on off yes no
-syn keyword tclLabel case default
+syn keyword tclProcCommand apply coroutine proc return tailcall yield yieldto
syn keyword tclConditional if then else elseif switch
-syn keyword tclConditional try finally
+syn keyword tclConditional catch try throw finally
+syn keyword tclLabel default
syn keyword tclRepeat while for foreach break continue
+
syn keyword tcltkSwitch contained insert create polygon fill outline tag
" WIDGETS
@@ -91,6 +87,11 @@ syn match tclVarRef "$\(\(::\)\?\([[:alnum:]_]*::\)*\)\a[[:alnum:]_]*"
" ${...} may contain any character except '}'
syn match tclVarRef "${[^}]*}"
+" Used to facilitate hack to utilize string background for certain color
+" schemes, e.g. inkpot and lettuce.
+syn cluster tclVarRefC add=tclVarRef
+syn cluster tclSpecialC add=tclSpecial
+
" The syntactic unquote-splicing replacement for [expand].
syn match tclExpand '\s{\*}'
syn match tclExpand '^{\*}'
@@ -203,9 +204,9 @@ syn match tclSpecial contained '\\[\[\]\{\}\"\$]'
syn region tclEmbeddedStatement start='\[' end='\]' contained contains=tclCommand,tclNumber,tclLineContinue,tclString,tclVarRef,tclEmbeddedStatement
" A string needs the skip argument as it may legitimately contain \".
" Match at start of line
-syn region tclString start=+^"+ end=+"+ contains=tclSpecial skip=+\\\\\|\\"+
+syn region tclString start=+^"+ end=+"+ contains=@tclSpecialC skip=+\\\\\|\\"+
"Match all other legal strings.
-syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=tclSpecial,tclVarRef,tclEmbeddedStatement skip=+\\\\\|\\"+
+syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=@tclSpecialC,@tclVarRefC,tclEmbeddedStatement skip=+\\\\\|\\"+
" Line continuation is backslash immediately followed by newline.
syn match tclLineContinue '\\$'
@@ -231,6 +232,9 @@ syn case match
syn region tclComment start="^\s*\#" skip="\\$" end="$" contains=tclTodo
syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo
+"syn match tclComment /^\s*\#.*$/
+"syn match tclComment /;\s*\#.*$/hs=s+1
+
"syn sync ccomment tclComment
" Define the default highlighting.
@@ -252,6 +256,7 @@ if version >= 508 || !exists("did_tcl_syntax_inits")
HiLink tclNumber Number
HiLink tclError Error
HiLink tclCommand Statement
+ HiLink tclProcCommand Type
HiLink tclString String
HiLink tclComment Comment
HiLink tclSpecial Special
@@ -279,4 +284,4 @@ endif
let b:current_syntax = "tcl"
-" vim: ts=8 noet
+" vim: ts=8 noet nolist