Here are the steps to create emmet snippets that take precedence over default ones:
- Create a new file in your preferred text editor.
- Save the file with the extension of .json, for example, emmet.json.
- In the emmet.json file, add your new emmet snippets in the following format:
{
"html": {
"snippets": {
"mytag": "<mytag>${1}</mytag>"
}
}
}
- 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.
- Save the changes made in the emmet.json file.
- Restart your text editor to apply the changes.
Your new emmet snippets will now take precedence over the default ones.