• Tcl Syntax Highlighting for TextMate Sep 2, 2006

    Posted by Mike Naberezny in Tcl

    I first discovered TextMate early this year when I began working with Ruby on Rails. Since then, it’s become my editor of choice and I use it for editing all of my Python and Ruby code.

    One of my customer projects has required me to work extensively with their custom Expect scripts so I have spent a good amount of time programming Tcl lately. Unfortunately, TextMate doesn’t ship with Tcl support out of the box.

    Lars Pind created an OpenACS Tcl bundle for use with the OpenACS framework but lost the files during a server move.

    While it’s not linked from the TextMate website, there is a bundle in the Subversion repository and its Tcl syntax highlighting works quite well. Installation is simple:

    $ svn --username anon --password anon export \
    http://macromates.com/svn/Bundles/trunk/Bundles/Tcl.tmbundle/
    
    $ mate Tcl.tmbundle
    

    For Expect users: The Tcl bundle won’t recognize Expect (.exp) files by default. After opening an .exp file, choose Tcl from the Language dropdown in the editor window. Expect files will now open with Tcl syntax highlighting. While Expect keywords like send_user won’t be highlighted, all standard Tcl keywords will be.