Ask Your Question
3

How can one create emmet snippets that take precedence over the default ones?

asked 2023-06-19 18:43:26 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-06-19 19:04:01 +0000

huitzilopochtli gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-19 18:43:26 +0000

Seen: 12 times

Last updated: Jun 19 '23