When I type the following text into an editor that understands emmet:
div.fragment>pre>code.javascript[contenteditable]
it expands to:
<div class="fragment">
<pre><code class="javascript" contenteditable=""></code></pre>
</div>
Which is almost perfect, except that the boolean attribute shouldn't have the quotes. Is there a way to write the shortcut so that it expands properly like this:
<div class="fragment">
<pre><code class="javascript" contenteditable></code></pre>
</div>
As of October 2013 this is now possible.
input[type=checkbox checked.]
Typing a single period (.) directly after the boolean attribute will produce the following output by default:
<input type="checkbox" checked="checked" />
If you want Emmet to output the attribute name without the argument e.g.
<input type="checkbox" checked />
You'll need to add the following key-value pair to the 'html' object in your Emmet user settings (Mac: 'Sublime Text' > 'Preferences' > 'Package Settings' > 'Emmet' > 'Settings - User')
"compact_bool": true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With