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

marc mnothrop at elaunceston.com
Wed Oct 6 18:29:54 UTC 2004


On 07/10/2004, at 5:16 AM, Sune Foldager wrote:

>> 2) I for one can never remember all the different versions of (X)HTML
>>    and how you're allowed to nest tags in each version and what tags
>>    have which attributes and so on.
>
> I think the best practice is to just write HTML like it was XHTML 
> strict.. or at least transitional. That is, always end your tags, 
> always end non-dual tags with /> and so on. I think making TM into an 
> editor which manages all the standards for you is a mistake. There is 
> the w3.org site for checking the standards, and I think it's best if 
> the person knows about it, not the program.

I agree with you in one sense, the developer has to know/learn the 
correct syntax, to work most effectively with it, but there's also a 
reason we have computers, they can do alot of the 'detail stuff' for 
us... like data entry validation, and error prevention.... : )

Sure, you don't want to completely cede all validation to the editor, 
but syntactic validity is function of an editor, think of it as JIT 
validation... and while the syntax strictness is a nice bonus I'd like 
to have, both to reinforce my standards knowledge, but also in speeding 
my entry, and preventing typos.

...but all of this talk about auto-completion is missing the fact that 
with a little work, Snippets offer some advantages... like the tab 
stops, *limiting*, or guiding your code navigation, but ironically, 
they'd also benefit from the ability to add valid attributes via 
code-hinting, once you want to deviate from the basic markup from the 
Snippet.


m




More information about the textmate mailing list