[TxMt] Re: First impressions
Jacob Rus
jacobolus at gmail.com
Tue Jan 29 23:35:45 UTC 2008
Konrad Hinsen wrote:
> Python support is really disappointing. Folding is completely useless
> (blocks end at the first blank line),
This is an unfortunate side-effect of TextMate's current folding system
which only allows foldings at matching indentation levels. It will
certainly change sometime in the hazy indefinite future of later TM
versions. In the mean time, as a workaround, if you get the whitespace
just right, foldings work great (there's a Cleanup Whitespace command in
the Python bundle which does this). It's far from ideal, but it works
for me.
> tabs are not handled in a
> reasonable way (using hard tabs with an indentation other than 8 is an
> invitation for disaster in Python code), leading to indentation errors,
I've never seen python code which uses a mix of hard tabs and spaces;
such is explicitly discouraged by every Python style guideline I've ever
seen. Pick either tabs or spaces and stick to it (you can set them with
the little dropdown at the bottom of every window). I personally prefer
4-space tabs (never using hard tab characters in my Python code), but
code using only hard tabs should also work fine, as should 2-space tabs
(e.g. Google's internal code, according to Guido), etc.
> and the error output in PyMate is insufficient (I want the full traceback).
The traceback should be close to identical to that you'd get in the
regular Python shell. Do you have an example where it differs
significantly?
> I looked a bit at the language definitions, and I have the impression
> that reasonable folding for LaTeX and Python cannot be implemented in
> TextMate, as the beginning and end of a block must be defined by a
> regular expression matching a single line. Or did I overlook something?
It can't be done for now. So we just have to keep our fingers crossed
for Allan's speedy progress. :)
-Jacob
More information about the textmate
mailing list