Sublime Text 2 wrapping selection in tag

Lars picture Lars · Jun 26, 2013 · Viewed 61.3k times · Source

In ST2, highlighting some text and pressing alt + shift + w (on Windows) will wrap the current selection in <p></p> tags. But is there a way to specify which tag to wrap with? Because maybe I want to wrap in a span, or a div instead.

Answer

Lars picture Lars · Jun 26, 2013

Using Emmet, place the cursor in the tag you want to wrap and press ctrl + w (for MacOS) or Alt+Shift+W (for Windows), a box will pop up to enter the type of tag you want to wrap with.