Ask Your Question

Revision history [back]

Here are the steps to create emmet snippets that take precedence over default ones:

  1. Create a new file in your preferred text editor.
  2. Save the file with the extension of .json, for example, emmet.json.
  3. In the emmet.json file, add your new emmet snippets in the following format:
{
    "html": {
        "snippets": {
            "mytag": "<mytag>${1}</mytag>"
        }
    }
}
  1. Place the emmet.json file in the right location, depending on your text editor:
  • Visual Studio Code: Go to File -> Preferences -> User Snippets -> Select Language -> Emmet to open the existing emmet.json file, or create a new one.
  • Sublime Text: Go to Preferences -> Package Settings -> Emmet -> User to open the existing emmet.json file, or create a new one.
  • Atom: Go to File -> Snippets -> Select the default.cson file, or create a new one.
  1. Save the changes made in the emmet.json file.
  2. Restart your text editor to apply the changes.

Your new emmet snippets will now take precedence over the default ones.