[TextMate] My first impression (mostly syntax coloring issues)

Allan Odgaard allan at macromates.com
Thu Oct 7 23:55:49 UTC 2004


On 7. Oct 2004, at 18:03, William Douglas Neumann wrote:

> 2: Am I wrong, or are the start/stop folding markers only available as 
> a
> single pair?  I would love to be able to supply a list of pairs to mark
> folds.  [...] these are sort of saved by the whole "same indent level" 
> constraint, but that also keeps me from easily doing things like 
> folding 1-11 of the nested function.

You can select line 1-11 and fold the selection. But not the same as 
automatic fold markers, I know!

> Since folding is naturally a pair oriented thing, using lists of stop 
> start markers would make writing/modifying fold definitions a breeze 
> (i.e. no more super hairy regexes).

The problem with the pair oriented approach is that you can have code 
like:

   1   namespace {
   2      class foo {
   3         void bar {
   4            // I'm about to write it...
   5      };
   6   }

If we match on the {, } pair, then it may show line 3-5 as foldable and 
2-6.

As of such, showing incorrect potential fold markers while editing code 
is not that much of a problem, but what is a problem is, if the text 
already had collapsed sections, and you start to add/remove fold 
markers (since it's pretty difficult to maintain foldings when the 
"tree" is manipulated).

> 3: I'd like to second, third, or nth the suggestion of global names 
> for colors and text styles.  I really like the way Vim does it, 
> separating color schemes from syntax/indentation schemes.

I think I'll do something similar to style sheets for the next version 
of the syntax highlight system (which will be a major upgrade, no ETA 
yet though -- I can send a full description to this list for comments 
when all details are settled) -- global names alone has the problem 
that "string" may appear as a name in e.g. both HTML and the embedded 
PHP (where they should probably differ in color), and/or that in some 
languages, it does make sense to color strings differently than what's 
generally wanted.

But style sheets a la CSS with selectors would probably be pretty 
flexible. Initially we postponed this, because we figured it would come 
off as too complex. But given the proper GUI editor, it'll probably 
appear as a huge simplification for most ;)

> 4: I'd also like to see a decreaseIndentPattern available as well. 
> [...]

Added to the to do.

> 5: Damn it's hard to see the line wrap indicator... Please make it 
> more visible.

I'll do as Luc Heinrich suggested and darken the background to the 
right of the wrap border. Not sure though if I should then lighten it, 
if the background is set to a very dark color (like black).

> 6: Ummm... how do I print from TM?  And if you do add printing, I 
> would *love* the ability to pass the text through something like a2ps 
> or enscript before printing it, without having to resort to writing a 
> command to do it.

I'll keep that in mind for when printing is added (yes, it's currently 
missing).

Kind regards Allan




More information about the textmate mailing list