RubyMine 2024.1 Help

Emmet

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

Item

Description

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

Item

Description

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 RubyMine 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 wrap (Ctrl+Alt+J) a URL address with the <a> tag, RubyMine encloses the URL address in <a href=""></a> and places the caret inside the double quotes in the href attribute. For example, wrapping https://www.jetbrains.com will result in the following:

    <a href="|">https://www.jetbrains.com</a>

  • If this checkbox is selected, and you wrap (Ctrl+Alt+J) a URL address with the <a> tag, RubyMine 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 https://www.jetbrains.com will result in the following:

    <a href="https://www.jetbrains.com">https://www.jetbrains.com</a>

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. For more information, refer to the Emmet documentation.

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

Item

Description

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 or press Alt+Insert. Then type the name of the property in the dialog that opens and enable it in the relevant browsers.

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

Emmet.JSX

Item

Description

Enable JSX Emmet

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

Last modified: 11 February 2024