sublimetext2 - Sublime Text 2 - HTML autocomplete -


in st2 when type div.foo , press tab goes <div class="foo"></div>

is there setting autocompletion that?

<div class="foo">
    // 4spaces here.
</div>

thank you.

updated

didn't find special setting found change snippet if intested. in sublime text 2/packages/html/html_completions.py change

snippet = "<{0} class=\"{1}\">$1$0".format(tag, arg)

to

snippet = "<{0} class=\"{1}\">\n\t$1\n$0".format(tag, arg)

solved.

you must using emmet.... stock sublime text 2 not auto complete class attribute typing element.class emmet's doing. use it... love emmet magic.

similarly type element>element make second 1 nest on first one. or element#id add id instead of class...

here entire cheat sheet emmet more completions using emmet plugin on st2.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -