[TxMt] A couple of thoughts from a TextMate newbie

Darren Brierton darren.brierton at gmail.com
Thu Apr 30 10:50:52 UTC 2009


Hello, long-time Emacs user / new TextMate user here. I wanted to drop  
by and say "hi", say how much I am loving TextMate so far (I thought  
nothing would drag me away from Emacs), and discuss a couple of  
features that I miss.

Firstly, I was on the whole a very happy user of Emacs, and an article  
I wrote describing my Emacs environment for XHTML/CSS/Javascript/PHP  
web development was even mentioned in the O'Reilly Emacs book. I'd  
tried TextMate a couple of years ago and not liked it, but I tried it  
again a few weeks ago and was blown away.

However there are two things that I miss. I have done a Google search  
on the mailing list archives and couldn't see much discussion of  
either of these, but please appreciate that the mailing list archive  
is very large and I'm new here so I apologies in advance if I'm just  
raking over things that have been discussed to death.

1. Good parenthesis matching and highlighting

I'm actually genuinely surprised at this. TexMate is very weak in this  
area. I should be able to put the cursor between say "})" and have the  
two closing parentheses highlighted in different colours and have  
their corresponding opening parenthese highlighted in matching colours.

2. The ability to parse DTDs and Schemas for automagic knowledge of  
markup languages

This is much more of a tall order, but it is something that PSGML mode  
and nXML mode provide in Emacs, and to some extent it is similar to  
what AUC-TeX provides for LaTeX editing in Emacs. With PSGML mode and  
nXML mode I can open any type of SGML or XML document and as long as  
Emacs can find the DTD or the Schema it automatically understands the  
language in question: it knows what elements are part of the language,  
where they can be inserted, what attributes those elements can have  
and even what attribute values they can have. That means that you  
don't need to write a MathML mode, an SVG mode, etc. In TextMate I  
needed to hand edit an SVG file but there is no SVG bundle, just an  
XML one. It was the first time in weeks I had to use Emacs. Similarly  
work is progressing rapidly now on HTML 5. Support will have to be  
laboriously added to TextMate for this in the absence of something  
which simply understood the DTD or Schema. AUC-TeX on Emacs worked in  
a similar way, in that it was capable of parsing the LaTeX packages  
you were using and automatically extracting the commands and  
environments they used and adding them to menus.

As I understand it, the features of TextMate 2.0 are somewhat shrouded  
in mystery, but I understand that the underlying engine for language  
grammars is being re-written. Does anyone know if the kind of feature  
I discussed is likely to be possible in TextMate 2? Maybe it is  
already possible in TextMate 1, but no one else has seen a need for it?

Anyway, so far the pros of TextMate are outweighing the cons. There  
were a large number of niggles with Emacs that were driving me up the  
wall, and so far it has been a joy to switch to TextMate. Better paren  
matching seems like something that just needs to be there. A more  
intelligent way for dealing with markup languages is highly desirable  
from my point of view, and could in the long-term end up being a deal- 
breaker. I'd be interested to hear what others think.

Best, Darren



More information about the textmate mailing list