[TxMt] [ANN] Context Sensitive HTML attribute completion

Thomas Aylott (subtleGradient) oblivious at subtlegradient.com
Wed Aug 8 21:21:03 UTC 2007


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/20070808/bfbf2975/attachment.html>


More information about the textmate mailing list