PyCharm 2022.3 Help

Emmet

On this page, configure Emmet preferences for HTML, XML, JavaScript (JSX Harmony) files and Style Sheets.

Expand abbreviation with

From this list, select the default key to expand Emmet selectors with. This key will also by default expand Emmet live templates.

Emmet.HTML

Enable XML/HTML Emmet

Select this checkbox to enable Emmet support for XML and HTML. If this checkbox is not selected, complicated abbreviations, such as div.class>ul#list>.item$) and similar, will not work in the editor.

Enable abbreviation preview

Select this checkbox to have PyCharm show a popup with a preview of the entered abbreviation before actually expanding it.

Abbreviation preview

Enable automatic URL recognition while wrapping text with <a> tag

  • If this checkbox is cleared and you attempt to wrap an URL address with the <a> tag, PyCharm encloses the URL address in <a href=""></a> and positions the cursor inside the double quotes in the href attribute. For example, wrapping http://www.jetbrains.com will result in <a href="|">http://www.jetbrains.com</a>:

    Emmet recognize url off
  • If this checkbox is selected and you attempt to wrap an URL address with the <a> tag, PyCharm inserts the URL address inside the double quotes as the value of the href attribute and encloses the URL in <a href="<wrapped URL>"></a>. For example, wrapping http://www.jetbrains.com will result in <a href="http://www.jetbrains.com">http://www.jetbrains.com</a>. Moreover, PyCharm highlights the wrapped URL green as a recognized URL:

    Emmet recognize url

Add edit point at the end of template

If this checkbox is selected, an editing position adds to the end of an HTML template ($END$);

if this checkbox is not selected, then the new edit point is not added.

Compare the following:

Edit point at the end of template

BEM

In this area, specify the BEM separators for the class names, modifiers and short elements. Refer to the Emmet documentation for details.

Filters enabled by default

In this area, specify which Emmet filters you want to be applied to an expanded abbreviation before it is shown in the editor. Learn more about filters at http://docs.emmet.io/filters/. To have a filter always applied by default, select the checkbox next to it. The available options are:

Emmet.CSS

Enable CSS Emmet

Select this checkbox to enable Emmet support for Style Sheets. If this checkbox is not selected, the complicated abbreviations, like bdci:n expanding into border-corner-image: none;, will not work in the editor.

Enable fuzzy search among CSS abbreviations

When this checkbox is selected, every unknown abbreviation will be scored against available template names. The match with the best score will be used to resolve the template. For example, with this option enabled, the following abbreviations can be equal to:

  • ov:h

  • ov-h

  • o-h

  • oh

Enable expansion of unknown properties ('unknown' to 'unknown:;')

  • When this checkbox is selected, any entered word will be expanded into the same word followed with a colon and a semicolon;

  • When this checkbox is cleared, only known properties (for example, color) will be expanded this way color:;

Auto insert CSS vendor prefixes

If this checkbox is selected, the CSS properties listed in the table below are expanded into constructs that contain pre-pending vendor prefixes. Learn more at Vendor prefixes.

If this checkbox is cleared, the entire table of properties is disabled.

Properties and vendor prefixes

The table contains a list of CSS properties and vendor prefixes that correspond to various browsers.

  • To enable or disable a property in a browser, select or clear the checkbox under the browser column.

  • To add a new property to the list, click the Add button App general add or press Alt+Insert. Then type the name of the property in the dialog box that opens and enable it in the relevant browsers.

  • To delete one or more properties from the list, select them and click Remove App general remove or press Alt+Delete.

Emmet.JSX

Enable JSX Emmet

Select this checkbox to use Emmet within XML fragments in the JSX Harmony context.

Last modified: 21 July 2022