# [OS X TeX] [editors] TextMate

Will Robertson will at guerilla.net.au
Thu Nov 25 19:58:54 EST 2004

Hi all

Given the recent mention of a couple of "TeX-using" programs, I thought
I'd just comment on a new editor that I've seen get a lot of mention
elsewhere but nothing yet here. I tried it out for a while yesterday
(there is a 30 day free trial but after that it costs US\$50) and
thought I'd share my findings...

TextMate is a stand-alone editor, and it feels a bit like SubEthaEdit
(without the OpenTalk collaborative editing) if you've used that.

It has in-built LaTeX syntax colouring and an extensible
templates/key-binding system which uses shell scripts (I think? At
least regular expressions with the sed program). There is no
applescript support (yet?), so scripts like we have in TeXShop and
iTeXMac are currently not possible. So far, nothing remarkable.

However, there are also a couple of novel features that I think are
worth bringing up:

It supports "bookmarks" without effecting the text of the document. I
don't know how it stores this information, but it allows you to flag
lines of the text and cycle through them with the F2 key.

It can change between soft and hard wrapping very nicely, and re-format
hard wrapped paragraphs so remove any "holes". I know emacs can do
this, but it's the first Cocoa editor I know of that does.

It also has a projects mode which supports a hierarchy of documents in
a draw that are also represented in a "tabbed-browsing" mode.

Most exciting is its ability to "fold" code.
Any \begin{}...\end{} block may be collapsed into a single line in the
source with a disclosure triangle in the left margin.

So something like:

1| $$\label{eq:laplace} 2| F(s) = \mathcal{L}\,\{ f(t) \} = \int^\infty_0\! f(t) e^{-st}\,\mathrm{d}t 3|$$
4|

Turns to:

1|  \label{eq:laplace} ...
4|

This folding idea is something I've had in the back of my mind for
ages, and I think it could be a huge feature for a TeX editor if
extended further to include curly braces and section commands and so
on. (This is extensible, so it could be done easily by someone who
knows regular expressions well.)

So the next step to get this program working nicely for TeX is to add
in typesetting commands and TeXniscope integration, both of which are
possible now by writing some support files (which would be fairly
easy). The syntax highlighting and extra nice stuff could also be
improved.

So my feeling is that if more support files are written, this editor
could be very interesting. To be honest, since we're paying I'd like
the authors of the program to write them, but if they don't use TeX
they might not get all the details right.

I'd be interested in hearing your own comments.

Will

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>