Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Darren Healy
seal-mask
.a{fill-rule:evenodd;}techdegree
Darren Healy
Front End Web Development Techdegree Student 23,565 Points

Wrapping code in brackets

Hi guys,

I have been following the "Framework Basics" course and Guil Hernandez often goes back to wrap code in sublime. I was wondering if anyone knew the shortcut for this in brackets?

Thanks in advance

Darren

4 Answers

Jose Fremaint
Jose Fremaint
2,885 Points

Thats a plugin for Sublime , the name is emmet. You can download it and read the documentation to learn how to use it. You can use it in brackets too.

This may be too late, but I had this same issue and went digging today. This is what I found, FWIW. There is an extension in Brackets called "Brackets Surround". Install that through the Extension Manager and once installed, you use "Ctrl+Shift+J" on Windows. Not sure about Mac. It should tell you the shortcut from the "Edit" tab once you've downloaded the extension. The process is the same. Select the text you want to wrap. Then a dialog box opens up. You only have to put the opening tag, and it will add the closing tag to the end.

Hi Darren, there's not a real shortcut (as far as I know) to do that. Just select the text you want to wrap up and, with text still highlighted, type the bracket. Unlike any other text editor where the bracket will overwrite the text selected, Sublime will wrap it up in brackets.

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Hi there,

You can use "Ctrl+Shift+W" on Mac, or "Alt+Shift+W" on Windows to wrap a selection in an HTML tag.