Sublime Forum

Some problem with the zencoding plugin?

#1

I like the zencoding and sublime.but I find some problem width the zen coding plugin for the sublime.

etc: I typed ‘img’ and press Tab key,the result code is ‘’,but is not ‘’,have no the ‘/’,some other tag like ‘br’,‘hr’ is also like this.

this is a bug of the plugin?or what? :frowning:

0 Likes

#2

Probably because zencoding is focused more on html and not on xhtml? :smile:

What’s your doctype? html5 or xhtml?

0 Likes

#3

[quote=“iamntz”]Probably because zencoding is focused more on html and not on xhtml? :smile:

What’s your doctype? html5 or xhtml?[/quote]

oh yes!!I try it in Xhtml,it’s ok;but i do it in the html4 and html5,it’s not OK. is this a bug?

0 Likes

#4

No, it’s not a bug. You might be misunderstood how html works. html4/5 doesn’t need self closing tags (input, img, hr, br etc). xhtml, because is more like a xml based language, will need to have those slashes.

However, xhtml being almost dead, i think you don’t have to concern about that :smile:

0 Likes

#5

i just cannot find zencoding plugin on pakage control, and is not installed.

0 Likes

#6

[quote=“iamntz”]No, it’s not a bug. You might be misunderstood how html works. html4/5 doesn’t need self closing tags (input, img, hr, br etc). xhtml, because is more like a xml based language, will need to have those slashes.

However, xhtml being almost dead, i think you don’t have to concern about that :smile:[/quote]

can i make it working the same in all doc-type? just need the self-closing tags…

0 Likes

#7

Not sure if that’s possible. Out of curiosity: why do you need self closing tags?

0 Likes

#8

because some time while i use other command will cause some mistake if the tag is not closed… :open_mouth:

0 Likes

#9

I’m currently looking for the same - empty elements that close like in XML even though I’m in a HTML5 (“HTML Syntax”) document. Other commands like “find closing tag” seem to mess up when I have a document where empty elements are used without trailing ‘/>’. Not every plugin (and I think not even every part of ZenCoding) knows about all the HTML tags that are empty even though they look open.

I just want to use XML syntax to have a more straightforward workflow (to use a buzz word here). So if you know of a configuration or a way to change ZenCoding such that it closes br img and friends with ‘/>’ even in HTML5 () documents, please let me know.

0 Likes