[TxMt] Scheme formatting
Timothy J. Wood
tjw at omnigroup.com
Thu Dec 21 19:42:42 UTC 2006
The current Scheme (and Lisp) plugins don't seem to format
according to the normal usage for these languages.
With the following text in TextMate in Scheme mode you get:
-----
(define (x y)
(let ((a 1)
(b 2))
(+ (* a b) y)))
-----
This is hard to see in mail unless you have plain text w/fixed
pitch on... but paste it into TextMate and align it with Scheme
selected.
Normally, the 'a' and 'b' in the 'let' form would align and the
'(' before the '+' and the '(' after 'let' would align.
TextMate makes a mess of this, though. I've looked over the
language definitions, but it would seem there is a pretty steep
learning cliff and I'd expect that this really should be working
already, so I thought I'd check if this is supposed to work or if
this is a known deficiency.
I can make the formatting at least look properly structured if I
drop closing parens onto their own lines, but this results in tons of
wasted space:
----
(define (x y)
(let
(
(a 1)
(b 2)
)
(+ (* a b) y)
)
)
----
Any hints? Thanks!
-tim
More information about the textmate
mailing list