Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 2 wrapping selection in tag

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.

like image 573
Lars Avatar asked Jun 26 '13 13:06

Lars


People also ask

How do you wrap text in Sublime Text?

If you click on “View” in the top bar again, then click “Word Wrap Column” you can select how wide you want the text to be before wrapping around. The default setting of “Automatic” is used to allow dynamic wrapping as you change the size of the window.


1 Answers

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.

like image 77
Lars Avatar answered Sep 24 '22 17:09

Lars