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

William Douglas Neumann wdnx at unm.edu
Thu Oct 7 16:03:27 UTC 2004


OK, I've just recently downloaded TextMate and have so far only used it
for woking on a new OCaml bundle for TextMate (I'll let ya'll know whan
it's finished), but here are some of my impressions (mostly centered
around the syntax section of the bundles).

1: Well, I'm pretty sure it's already passed BBEdit in my eyes -- BBEdit
is really nice for doing HTMLish stuff, but not so good for general 
programming or even *TeX work -- TM seems to be much more flexible.

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.  For example, I would like to fold sections that match the
following regex pairs (and probably others as well):
 	\<let\>.*(?!\<in\>),(in|;;)$
 	\<struct\>,end(;;)?
 	\<sig\>,end(;;)?
 	\<object\>,end(;;)?

So that, given the following OCaml snippets:

          Nested function                     Class definition
----------------------------------   --------------------------------
  1:  let f x y =                       1:  class c =
  2:    let g z = z * x + y in          2:    object
  3:    let h p r =                     3:      val mutable x
  4:      if x > y then                 4:      method moveSq y =
  5:        begin                       5:        let sq x = x * x in
  6:          p := g !p;                6:        x <- x + (sq y)
  7:          r := g !r;                7:      method where = x
  8:          g x                       8:    end
  9:        end
10:      else
11:        g y in
12:    h (ref (g 0)) (ref (g 1));;

In the nested function, I can fold lines 3-11 and/or 1-12 without worrying 
about the end in line 9 short circuiting things, and similarly, with the 
class definition, I'd like to be able to fold lines 2-8 without worrying 
about the in from line 5 short circuiting things.

Right now, 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.  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).

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.

4: I'd also like to see a decreaseIndentPattern available as well.  For 
example, in the snippets above, the lines with end or method  should be 
able to automatically snap back to the proper indentation when I type them 
in.  I really think Vim has it dead on when it comes to the flexibility of 
syntax, indent, and color definitions -- you guys should really take a 
look at what they've done.

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

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.

Well, my memory seems to be shot at the moment, so I'll stop the list 
there, but I'll keep plugging away at TM to see if I can finally unseat 
Vim as my everyday text editor.

And if anyone knows an easy workaround to any of the above issues, please 
help a poor doofus out and let me know what they are...

William D. Neumann
<wdnx at unm.edu>

---
Dear Lord, please make me the kind of person
my dog thinks I am.



More information about the textmate mailing list