[TxMt] [ANN] Context Sensitive HTML attribute completion

Thomas Aylott (subtleGradient) oblivious at subtlegradient.com
Thu Aug 9 23:01:43 UTC 2007


¡¡¡UPDATED!!!

This has now been changed to option-escape like every other completion  
thing on the mac.

<div ⌥⎋>
or
<img ⌥⎋ />
and
<img on⌥⎋ />

I also added support for no extra space:
<div⌥⎋>

And you can now activate it anywhere inside the tag and outside of  
another attribute, even right up against a quote mark.
<div id="whatever"⌥⎋ class="whatever">

And of course, if you activate it with some characters before your  
caret and there's only one match returned, it just automatically  
inserts it without asking you to choose from among 1 choices ;)

I also fixed a few bugs where it would activate before and after the  
tag or on a newline, etc...

If you find any more bugs, please let me know as soon as you possibly  
can.
Thanks!

	thomas Aylott — subtleGradient — CrazyEgg — bundleForge

On Aug 8, 2007, at 5:21 PM, Thomas Aylott (subtleGradient) wrote:

> Context Sensitive HTML attribute completion!!!
>
> You'll have to have the latest copy of the support folder and the  
> HTML bundle.
> I have tested this quite a bit on my machine, but
> if you can find a way to make it break, please let me know and I'll  
> fix it right up.
>
> To use: tap the space key when your caret is just before the last  
> character in an html tag.
> It looks up a list of attribute to tag associations and only shows  
> you a list of the ones that apply to the current tag that you're in.
>
> <div TAP_SPACE_HERE>
> or
> <img TAP_SPACE_HERE />
>
> If you type a few characters before you hit space, it'll use those  
> characters to limit your list even further.
> for example:
>
> <img onTAP_SPACE_HERE />
>
> That will limit your list of completions to anything that starts  
> with "on" and is applicable to the <img> tag.
>
> Also, works with lowercase and UPPERCASE HTML tags. When you use  
> uppercase tagnames it'll give you upper and titlecase attribute  
> names, depending on what's appropriate.
>
> This version DOES NOT look at your doctype, it just gives the same  
> list for all html languages.
> I think I'll wait for TM2 to do the doctype thing since it'll be a  
> lot easier then.
>
> I'll do an official announcement with screencast and everything once  
> people argue endlessly about the keybinding that it should use.
>
> 	thomas Aylott — subtleGradient — CrazyEgg — bundleForge

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20070809/69828abf/attachment.html>


More information about the textmate mailing list