css - Sublime 2 autocomplete html with multiple classes -


i don't know how create html tag multiple classes. each time do, strange result.

if want anchor classes "foo" , "bar", , write

a.foo.bar 

it turns into:

a.<foo class="bar"></foo> 

what proper way this?

as mentioned mblanc in comments, emmet want.

  1. install package control if haven't already
  2. open command palette (ctrlshiftp in windows , linux, shiftp in os x)
  3. type pci bring package control: install package , hit enter
  4. type emmet, hit enter, wait install, restart sublime.

now, in html document, type:

a.foo.bar 

hit tab, , automatically expands to

<a href="|" class="foo bar"></a> 

where | cursor position. type in href, hit tab again, , cursor moves here:

<a href="foobar.html" class="foo bar">|</a> 

so can enter link's text.

make sure read through documentation on emmet.io, extremely powerful plugin, , once used coding immensely faster.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -