[TextMate] Re: HTML, auto-complete and snippets
marc
mnothrop at elaunceston.com
Wed Oct 6 17:21:17 UTC 2004
On 07/10/2004, at 4:07 AM, Lucas K. Mathis wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 6.10.2004, space aliens observed Justin French saying:
>>> The main feature I use in BBEdit is the excellent CSS support. I can
>>> easily create new CSS rules and find out what the correct syntax is.
>>> Having something similar in TextMate would be great.
>> All the CSS properties (font-size, width, height, etc) are all in
>> there as keywords, as are all the units (px, em, etc). Agreed, most
>> of the values (bold, underline, block) are not in there yet, and TM
>> has no idea if "left" is a valid value for "float", but I don't think
>> BBEdit knows this either...
>
> It does, though :-)
<snip>
> Then I hit Cmd-Opt-M, and now I get a list of possible values for this
> property along with related properties.
>
> HTML tags work the same. This helps since
>
> - I only ever use tags that are valid in the scope that I am in
> - I always know what tags/properties I can use and how to spell them
> - I always know what values are allowed
Me 2! ; )
> I'm not sure if something along those lines is planned for TextMate
> since it may not be as much targeted at HTML as BBEdit is, but it would
> certainly be very nice to have something like this, maybe even more
> automatic, for example with dropdown lists of legal
> functions/tags/properties/values/... automatically appearing while
> typing.
>
> lucas
Lucas, just in case you're not aware, that's exactly how skEdit
operates -- I'm currently trying to work out if a combination of
Snippets and Macros can substitute for syntax-aware code hinting...
there are benefits in both approaches, and each could learn from each
other.
As noted by others (esp. Eric Curtis in his very good post) TextMate
isn't fully aimed at the HTML crowd, at least not to begin with.
Crucial for HTML, IMHO, is some form of asset awareness, skEdit (broken
record!) offers completion of image names, file references, class names
etc., because it is aware of these elements -- it even has an image
viewer, click on an image from and you're site folder in TM, like that
HEX?!
Sorry, I don't mean to be sarcastic, just raising some things that are
useful to the web crowd, but that can apply to coders too (awareness of
other files/classes etc. without you having to type it initially to get
it into the completion buffer.)
marc
More information about the textmate
mailing list