Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wrapping a HTML element in Visual Studio Code using Emmet [duplicate]

I am using VSC for developing html pages. It's been a great experience using emmet with VSC, but often I find in a situation where I have to wrap a set of elements with a div, but have to use emmet on a single line and then cut paste the end tag at the end of the set of elements I want to map.

Is there any way where I can use emmet and automatically wrap the output of emmet around a set of selected elements?

like image 650
Raghavendra Kumar Avatar asked Jun 11 '17 03:06

Raghavendra Kumar


People also ask

How do you wrap text in VS Code?

wordWrap": "on" You can toggle word wrap for the VS Code session with ⌥Z (Windows, Linux Alt+Z).

How do I get HTML Emmet in VS Code?

Open the VS Code settings (Code → Preferences → Settings) and search for “Emmet Extensions Path”. Click “Add Item”, enter the path to the folder where you've saved the snippets.


1 Answers

Try the Emmet: Wrap with Abbreviation command:

enter image description here

like image 91
Matt Bierner Avatar answered Sep 30 '22 01:09

Matt Bierner