Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change default Emmet settings in VS Code

Is it possible to change default (not for single project) Emmet behaviour for command ! in Visual Studio Code?

For example, I don't want to see the attribule lang="en" in <html> tag? Also I don't want to see the string:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

And maybe I will want to add some another strings to default Emmet-behaviour in VS Code.

like image 622
Sergei Martianov Avatar asked Mar 08 '26 16:03

Sergei Martianov


1 Answers

According to official documentation you can add or overwrite the contents of default Emmet snippets in VS Code with custom ones. Here how you can do it:

  1. Firstly you need to create to the snippets.json file and set the path to it in user settings.

     "emmet.extensionsPath": "C:\\Users\\Folder\\snippets.json"
    
  2. Then you should figure out which snippet to change, see default HTML snippets and CSS snippets.

  3. Finally overwrite the snippet in snippets.json. For example:

emmet-snippet

Hopefully it will help you solve your issue! Good luck!

like image 190
Raymoff Avatar answered Mar 11 '26 08:03

Raymoff



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!