[TextMate] Re: HTML, auto-complete and snippets

Lucas K. Mathis macromates.com at lkmc.ch
Wed Oct 6 17:07:51 UTC 2004


-----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 :-)

Here's how BBEdit work. If I have something like this:

    .foo {
    
    }

I move the cursor between the two brackets and hit Cmd-M. This gives me
a list of properties. I select one. This gives me something like this:

    .foo
    {
        border-color: ;
    }

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

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

- -- 
"I hate words."
"Words suck."
"If I wanted to read, I'd go to school."
  -- Beavis & Butthead

-----BEGIN PGP SIGNATURE-----
Version: PGP SDK 3.2.2

iQA/AwUBQWQmVrXYdom/dB2cEQJMKACgpXlWarOtjYDq1G1xC2kVjUTXLT4AniDv
QYLRRQoh7EyG7msEVmKmR/E4
=yi2e
-----END PGP SIGNATURE-----



More information about the textmate mailing list