Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

HTML generation from CSS selectors #2029

Closed
adam-lynch opened this issue Nov 2, 2012 · 17 comments
Closed

HTML generation from CSS selectors #2029

adam-lynch opened this issue Nov 2, 2012 · 17 comments

Comments

@adam-lynch
Copy link

I just came across Emmet. It would be really cool if this could be integrated into Brackets or something similar was achievable.

It translates stuff like:

#page>div.logo+ul#navigation>li*5>a{Item $}

into:

<div id="page">
    <div class="logo"></div>
    <ul id="navigation">
        <li><a href="">Item 1</a></li>
        <li><a href="">Item 2</a></li>
        <li><a href="">Item 3</a></li>
        <li><a href="">Item 4</a></li>
        <li><a href="">Item 5</a></li>
    </ul>
</div>
@redmunds
Copy link
Contributor

redmunds commented Nov 2, 2012

Hi Adam,

This looks pretty cool. Let me know if you would like to try to write an extension for Brackets with this functionality and I can help get you going.

Thanks,
Randy

@pthiess
Copy link
Contributor

pthiess commented Nov 6, 2012

Reviewed -- move to Trello;

@gruehle
Copy link
Member

gruehle commented Nov 6, 2012

@DennisKehrig has started work on an Emmet plugin for Brackets: https://github.com/sergeche/zen-coding/tree/v0.7.1/plugins/brackets

@DennisKehrig
Copy link
Contributor

@sergeche did, for the most part, but I worked with him a bit, indeed (see #1559)

@sergeche
Copy link

sergeche commented Nov 6, 2012

Yeah, I have a plugin for Brackets but I can’t release it because Bracket’s RequireJS lib conflicts with Emmet modules: #1495

Somebody (maybe me) should update RequireJS in Brackets.

@DennisKehrig
Copy link
Contributor

I think we actually did recently...

@DennisKehrig
Copy link
Contributor

Indeed: #1968

@sergeche
Copy link

sergeche commented Nov 6, 2012

Oh, great! I’ll check Emmet plugin today and if everything works as expected, I’ll release it.

@DennisKehrig
Copy link
Contributor

Internally, I'm jumping up and down a bit :)

@adam-lynch
Copy link
Author

Great! It was nice to see this unfold after creating a simple issue

@DennisKehrig
Copy link
Contributor

Hey @adam-lynch, long overdue: on https://github.com/emmetio/emmet/downloads you'll find the Emmets plugin for Brackets.

To install, start Brackets, open the Help menu, click "Show Extensions Folder", open the "user" subfolder and extract the Emmet-Brackets-v1.0.zip there. Then, restart Brackets. You should now have an Emmets menu with all the options you need.

Good luck and have fun! :)

@adam-lynch
Copy link
Author

Great! Thanks.

FYI, extracting the ZIP into that directory wasn't enough. When it extracted, it just extracted the individual files there. I needed to create an "Emmet-Brackets-v1.0" directory for it to work.

@DennisKehrig
Copy link
Contributor

Ooooh, thanks and sorry! You're right of course. I was too focused on mentioning the user part because that was the most common cause for trouble when installing extensions recently. You can just rename "Emmet-Brackets-v1.0" to "emmet", though, the exact name is irrelevant.

Glad you got it to run anyway :)

@adam-lynch
Copy link
Author

Cool, thanks.
It's great by the way... loving the keyboard shortcuts

@adam-lynch
Copy link
Author

This doesn't work for me with Brackets 22. The shorcuts & menu actions don't do anything

@WebsiteDeveloper
Copy link
Contributor

you'll have to open a bug in the emmet extension repo because some shortcuts were previously overwritten by the extension which is no longer possible as of Sprint 22.
Note: You should see several errors in the developer console when starting brackets because of that.

@adam-lynch
Copy link
Author

@WebsiteDeveloper You're right. There's an existing issue for that. But the more interesting error is aTypeError, which I think is the cause of my problem. See brackets-emmet#10.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants