lorenzos / ZenCodingNetBeansPlugin

Zen Coding plugin for NetBeans
232 stars 57 forks source link

How to Change an Abbreviation's Expanded Text #8

Closed randie closed 13 years ago

randie commented 13 years ago

How do you change what a Zen Coding abbreviation is expanded to? For example, I would like "script" to be expanded to "[script][/script]" instead of "[script type="text/javascript"][/script]" (note: had to replace angle brackets with square brackets so they don't get deleted.)

Thanks.

lorenzos commented 13 years ago

You cannot. All the plugin is based on the original Zen Coding javascript library. All shortcut are defined there and are hard-coded in my plugin. The only chance is to download plugin sources, manually edit the Zen Conding javascript library and then re-compile it again. Sorry :( Can I ask you why you have to remove the type="text/javascript" attribute?

randie commented 13 years ago

You asked why I wanted to remove the "type=text/javascript" in the expanded text for "script" ... Answer: Because it's not required in html5. And actually, according to Douglas Crockford (http://yuilibrary.com/theater/douglas-crockford/crockford-tjpl/), it's not required at all for javascript- i.e. when the browser sees the script tag without a type attribute, it will assume javascript by default.

lorenzos commented 13 years ago

I undestand, you are right. So, I hope future releases of Zen Conding will fix this "issue". In the case, I will update my plugin too.