-2

If i code on .php file

<div id= ~~
emmet => idate, idn_to_ascii, idn_to_utf-8 ... etc

If i code on .htmlfile

<div id= ~~
emmet => id

I use html,css,js emmets on .html file. But i can't use html,css,js emmets on .php file.

If you know about this problem, please comment to me.

Nikola Kirincic
  • 3,651
  • 1
  • 24
  • 28
Mugglim
  • 35
  • 2
  • 6

1 Answers1

2

Emmet doesn't recognize the context in other file types than .html, .css and .js, so you should point it to. Use the emmet.includeLanguages setting.

Example:

  "emmet.includeLanguages": {
        "php": "html"
    },

Check the detailed docs for Visual Studio Code for using Emmet in other file types

source: https://code.visualstudio.com/docs/editor/emmet#_emmet-abbreviations-in-other-file-types

The only thing is that emmet.includeLanguages doesn't support one to many mapping yet, so you can map to only one entity, either html or css (issue source: https://github.com/Microsoft/vscode/issues/62910).

Nikola Kirincic
  • 3,651
  • 1
  • 24
  • 28