'Is it possible to EDIT built-in Emmet abbreviations in VSC?

I'd like to be able to edit default behaviour of "!" instead of creating my own version of "!" from scratch.

Is it possible to edit (tweak) default behaviours of Emmet abbreviations in VSC?



Solution 1:[1]

Yes! From the docs:

Custom Emmet snippets need to be defined in a json file named snippets.json. The emmet.extensionsPath setting should have the path to the directory containing this file.

{
  "html": {
    "snippets": {
      "ull": "ul>li[id=${1} class=${2}]*2{ Will work with html, pug, haml and slim }",
      "oll": "<ol><li id=${1} class=${2}> Will only work in html </ol>",
      "ran": "{ Wrap plain text in curly braces }"
    }
  },
  "css": {
    "snippets": {
      "cb": "color: black",
      "bsd": "border: 1px solid ${1:red}",
      "ls": "list-style: ${1}"
    }
  }
}

More info here.

You can also modify existing blocks using filters.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tim