Home Download Buy Blog Forum Support

CSS selector tag creator

CSS selector tag creator

Postby PauloCH8 on Wed Nov 14, 2012 12:30 am

Hello,

Is there a feature in Sublime witch could create tags from a CSS selector kind of String.
Like

div#container.text>p>i


would create

Code: Select all
<div id="container" class="text">
  <p>
    <i>
    </i>
  </p>
</div>


or like a

div#cointainer>div#main>ul#nav>li*4>lorem

whoud create

Code: Select all
<div id="container">
  <div id="main">
    <ul id="nav">
        <li>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
   tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
   quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
   consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
   cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
   proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        </li>
        <li>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
   tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
   quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
   consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
   cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
   proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        </li>
        <li>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
   tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
   quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
   consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
   cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
   proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        </li>
        <li>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
   tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
   quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
   consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
   cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
   proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        </li>
    </ul>
  </div>
</div>


I've seen a mac software which do that. Is Espresso
http://macrabbit.com/espresso/

I saw Sublime do kind of it, or I am not using correctly.
Anyone knows if it work?
PauloCH8
 
Posts: 2
Joined: Wed Nov 14, 2012 12:12 am

Re: CSS selector tag creator

Postby PauloCH8 on Wed Nov 14, 2012 12:33 am

Ah, it's called Zen Code

http://code.google.com/p/zen-coding/

Sublime can do that?
PauloCH8
 
Posts: 2
Joined: Wed Nov 14, 2012 12:12 am

Re: CSS selector tag creator

Postby skuroda on Wed Nov 14, 2012 12:40 am

2 possibilities for you.

The sublime plugin for zen coding.
https://github.com/sublimator/ZenCoding

The (successor?) to zen coding.
https://github.com/sergeche/emmet-sublime

Both are available through package control.
skuroda
 
Posts: 676
Joined: Fri Oct 05, 2012 8:11 am

Re: CSS selector tag creator

Postby C0D312 on Wed Nov 14, 2012 1:10 am

Go with emmet. Zencoding is a bit buggy.

http://wbond.net/sublime_packages/packa ... stallation
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot], Losgard, MystickPhoenix, tgkeul, Yahoo [Bot] and 35 guests