syntaxProfiles.json

Output profiles are used to define how generated HTML content should look like. For example, when you expand br abbreviation, Emmet may produce one of the following tag:

输出配置用于定义如何输出 HTML 。例如当展开 br 缩写, Emmet 有下面几种输出:

Emmet tries to automatically detect output profile for current document. For example, if a document contains XHTML doctype, it will use xhtml profile, html otherwise.

Emmet 试着自动检测当前文档的输出配置。例如如果文档包含 XHTML doctype,则 Emmet 将使用 xhtml 配置,否则使用 html 配置。

But sometimes you’d like to force Emmet to use another profile for specified syntax or use your own profile with specific rules.

但是有时你想对特定语法强制 Emmet 使用另一种配置或者自定义配置。

In this case, you should create syntaxProfiles.json file in extensions folder and specify profile for a required syntax.

在这种情况下,在扩展目录下创建文件 syntaxProfiles.json,对目标语法指定配置。

The content of this file is a simple key–value dictionary where the key is the syntax name as defined in snippets.json and the value is a name of predefined profile (String) or a dictionary with profile options :

此文件内容是简单的字典键值对,键是 snippets.json 文件里的语法名,值是预定义配置名 (String) 或含有配置选项的字典(Object):

{
    // force XHTML profile for HTML syntax
    "html": "xhtml",

    // create our own profile for XML
    "xml": {
        "tag_case": "upper",
        "attr_quotes": "single"
    }
}

Predefined profiles 预定义配置

Create your own profile 创建自己的配置

You can specify a dictionary with the following keys to create your own output profile:

用下面选项创建自己的配置: