# YAML

IntelliJ IDEA enables you to work with YAML files (`.yml`, `.yaml`) and supports the following capabilities:

* Syntax highlighting You can change [color settings](configuring-colors-and-fonts.html) on the Editor | Color Scheme | YAML page of the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))).

* [Code formatting](reformat-and-rearrange-code.html) You can access code style settings related to YAML on the Editor | Code Style | YAML page of the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))).

* [Inspections](https://www.jetbrains.com.cn/en-us/help/inspectopedia/YAML.html) IntelliJ IDEA detects duplicated keys, unused [anchors](#anchors_and_aliases) in YAML documents, and so on.

* [Code completion](auto-completing-code.html) For example, you can use code completion for YAML documents that have the [JSON schema](#json_schema), or you can complete anchor aliases.

* [Navigation and search](navigating-through-the-source-code.html) For instance, you can navigate between [anchors and aliases](#anchors_and_aliases).

* [Finding anchor usages](#find-usages)

* [Rename refactorings](rename-refactorings.html) (for example, for [anchors and aliases](#anchors_and_aliases))

* [Typing handlers](#typing-handlers) IntelliJ IDEA maintains indentation, sequence markers, brackets, and quotes as you type.

Let us explore some YAML-specific features available in the editor.

## Anchors and aliases

IntelliJ IDEA supports working with anchors and aliases. If you specify a new anchor in the YAML file, the editor will show a warning that this anchor is not used by any node.

![YAML: unused anchor warning](https://resources.jetbrains.com.cn/help/img/idea/2026.2/yaml_unused_anchor_warning.png)

The editor enables you now to [complete](auto-completing-code.html) aliases for this anchor.

![YAML: complete alias](https://resources.jetbrains.com.cn/help/img/idea/2026.2/yaml_complete_alias.png)

> **Note:**
> You can [navigate](navigating-through-the-source-code.html) from aliases to the anchor using the `Ctrl+B` (Windows), `⌘ B` (macOS), `⌘ B` (IntelliJ IDEA Classic (macOS)), `⌘ B` (macOS System Shortcuts), `Ctrl+B` (XWin), `Ctrl+B` (GNOME), `Ctrl+B` (KDE), `Ctrl+Alt+G` (Emacs), `F12` (Sublime Text), `F12` (Sublime Text (macOS)), `Ctrl+B` (NetBeans), `F12` (Visual Studio), `F12` (Visual Studio (macOS)), `F3` (Eclipse), `F3` (Eclipse (macOS)) shortcut.

To quickly find usages of an anchor, place the caret on the anchor and press `Ctrl+B` (Windows), `⌘ B` (macOS), `⌘ B` (IntelliJ IDEA Classic (macOS)), `⌘ B` (macOS System Shortcuts), `Ctrl+B` (XWin), `Ctrl+B` (GNOME), `Ctrl+B` (KDE), `Ctrl+Alt+G` (Emacs), `F12` (Sublime Text), `F12` (Sublime Text (macOS)), `Ctrl+B` (NetBeans), `F12` (Visual Studio), `F12` (Visual Studio (macOS)), `F3` (Eclipse), `F3` (Eclipse (macOS)).

![YAML: navigate to aliases](https://resources.jetbrains.com.cn/help/img/idea/2026.2/yaml_navigate_aliases.png)

IntelliJ IDEA supports the [rename refactoring](rename-refactorings.html) for anchors and aliases: Place the caret on the anchor and press `Shift+F6` (Windows), `⇧ F6` (macOS), `⇧ F6` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ R` (macOS System Shortcuts), `Shift+F6` (XWin), `Shift+F6` (GNOME), `Shift+F6` (KDE), `Shift+F6` (Emacs), `Shift+F6` (Sublime Text), `⇧ F6` (Sublime Text (macOS)), `Ctrl+R` (NetBeans), `Ctrl+R, R` (Visual Studio), `⌘ R, R` (Visual Studio (macOS)), `Alt+Shift+R` (Eclipse), `⇧ F6` (Eclipse (macOS)). Alternatively, right-click the anchor and select `Refactor | Rename`.

![renaming the YAML anchor](https://resources.jetbrains.com.cn/help/img/idea/2026.2/yaml_rename_anchor.animated.gif)

Use the Structure tool window (`Alt+7` (Windows), `⌘ 7` (macOS), `⌘ 7` (IntelliJ IDEA Classic (macOS)), `⌘ 7` (macOS System Shortcuts), `Alt+7` (XWin), `Alt+7` (GNOME), `Alt+7` (KDE), `Alt+7` (Emacs), `Alt+7` (Sublime Text), `⌘ 7` (Sublime Text (macOS)), `Ctrl+7` (NetBeans), `Ctrl+Alt+F` (Visual Studio), `⌃ ⌥ F` (Visual Studio (macOS)), `Alt+7` (Eclipse), `⌘ 7` (Eclipse (macOS))) to quickly navigate through YAML files. To show or hide elements of reused anchors in the  Structure  tool window, click ![View Options](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app-client.expui.general.show.svg) use  Aliased sub-trees .

![YAML structure view](https://resources.jetbrains.com.cn/help/img/idea/2026.2/yaml_structure_view.png)

## JSON schemas

IntelliJ IDEA supports code completion and inspections for YAML files using the JSON schema. IntelliJ IDEA can infer a schema automatically (based on the file location or structure), or you can [select it manually](#select-schema-for-file). For example, if you have GitHub Actions workflow files in the `.github/workflows` directory, IntelliJ IDEA will suggest completing its options based on the `github-workflow.json` schema automatically loaded from [schemastore.org](http://schemastore.org):

![YAML: complete based on schema](https://resources.jetbrains.com.cn/help/img/idea/2026.2/yaml_complete_github_actions.png)

You can manage loading JSON schemas using the Languages & Frameworks | Schemas and DTDs | Remote JSON Schemas page   of the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))).

If necessary, you can specify a path to the required schema file in Languages & Frameworks | Schemas and DTDs | JSON Schema Mappings.

> **Tip:**
> For more information about managing JSON schemas in IntelliJ IDEA, refer to [Use schemas from JSON Schema Store](json.html#ws_json_using_schemas).

Procedure: Select a JSON schema for a file

You can specify a custom schema for a particular file.

1. Click the schema switcher in the status bar.

![Select schema for a file](https://resources.jetbrains.com.cn/help/img/idea/2026.2/yaml_select_json_schema.png)

2. In the list that opens, select one of the suggested schemas or click New Schema Mapping…. This will open the JSON Schema Mappings settings where you can specify a local or remote schema for your file.

Procedure: Get properties from a schema

If IntelliJ IDEA detects a schema for your YAML file, you can quickly insert all of its properties into that file using a dedicated action, removing the need for manual typing.

* If a schema contains required properties, and you want to insert only these particular properties, press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Alt+Enter` (NetBeans), `Alt+Enter` (Visual Studio), `⌥ ⏎` (Visual Studio (macOS)), `Ctrl+1` (Eclipse), `⌘ 1` (Eclipse (macOS)) (Show Context Actions) anywhere in a file and select Add missing properties.

* If you want to insert all properties available in the schema, press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Alt+Enter` (NetBeans), `Alt+Enter` (Visual Studio), `⌥ ⏎` (Visual Studio (macOS)), `Ctrl+1` (Eclipse), `⌘ 1` (Eclipse (macOS)) ( Show Context Actions) anywhere in a file and select Fill in all properties from JSON schema.

Procedure: Use $schema keyword

You can also refer to a schema right in the file itself.

1. At the top of the file, enter `# $schema:`.

2. Start typing the name of a schema file. You will get completion for the names of schemas loaded from [schemastore.org](http://schemastore.org).

If you want to use a local schema file, specify the path to it relative to the file where you want to use the schema, for example, `# $schema: ./my-schema.json`. This will enable the same coding assistance that you would have when you use a remote schema, including inspections, completion, and property filling actions.

![Completion from local schema](https://resources.jetbrains.com.cn/help/img/idea/2026.2/yaml_completion_from_local_schema.animated.gif)

## Copying keys

IntelliJ IDEA provides the ability to copy a full path to a specific option specified in the YAML file.  You can do this in two ways:

* Place a caret to the required key and press `Ctrl+Alt+Shift+C` (Windows), `⌘ ⌥ ⇧ C` (macOS), `⌘ ⌥ ⇧ C` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ⇧ C` (macOS System Shortcuts), `Ctrl+Alt+Shift+C` (XWin), `Ctrl+Alt+Shift+C` (GNOME), `Ctrl+Alt+Shift+C` (KDE), `Ctrl+Alt+Shift+C` (Emacs), `Ctrl+Alt+Shift+C` (Sublime Text), `⌘ ⌥ ⇧ C` (Sublime Text (macOS)), `Ctrl+Alt+Shift+C` (NetBeans), `Ctrl+Alt+Shift+C` (Visual Studio), `⌘ ⌥ ⇧ C` (Visual Studio (macOS)), `Ctrl+Alt+Shift+C` (Eclipse), `⌘ ⌥ ⇧ C` (Eclipse (macOS)).

* Hover over the required key, right-click it and select Copy Reference.

![YAML: copy references](https://resources.jetbrains.com.cn/help/img/idea/2026.2/yaml_copy_references.png)

For example, on the image above, `default.server.port` will be copied.

> **Tip:**
> You can [search](searching-everywhere.html) for nested YAML keys using flattened syntax. For instance, to find the `port` value in the example, press `Shift` (Windows), `Shift` (macOS), `Shift` (IntelliJ IDEA Classic (macOS)), `Shift` (macOS System Shortcuts), `Shift` (XWin), `Shift` (GNOME), `Shift` (KDE), `Shift` (Emacs), `Shift` (Sublime Text), `Shift` (Sublime Text (macOS)), `Shift` (NetBeans), `Shift` (Visual Studio), `Shift` (Visual Studio (macOS)), `Shift` (Eclipse), `Shift` (Eclipse (macOS)) twice and type `default.server.port`.

## Typing handlers

As you edit YAML files, IntelliJ IDEA maintains indentation, sequence markers, brackets, and quotes for you. In the following examples, `<caret>` marks the caret position.

### Sequence markers

When you press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)) after a sequence item, IntelliJ IDEA starts a new item and inserts the `-` marker automatically:

Before:

```YAML
services:
  - nginx<caret>
```

After:

```YAML
services:
  - nginx
  - <caret>
```

If you press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)) again on the empty item, IntelliJ IDEA removes the marker and moves the caret to the parent indentation level, including in nested sequences.

When a sequence item holds a mapping, pressing `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)) continues the mapping on a new indented line without adding a second marker, even when marker insertion is on:

Before:

```YAML
services:
  - name: web<caret>
  - name: db
```

After:

```YAML
services:
  - name: web
    <caret>
  - name: db
```

To delete an empty item, press `Backspace` (Windows), `⌫` (macOS), `⌫` (IntelliJ IDEA Classic (macOS)), `⌫` (macOS System Shortcuts), `Backspace` (XWin), `Backspace` (GNOME), `Backspace` (KDE), `Backspace` (Emacs), `Backspace` (Sublime Text), `⌫` (Sublime Text (macOS)), `Backspace` (NetBeans), `Backspace` (Visual Studio), `⌫` (Visual Studio (macOS)), `Backspace` (Eclipse), `⌫` (Eclipse (macOS)) after the space that follows the `-` marker. IntelliJ IDEA removes the `-` and the space that follows it in a single action. If a value follows the marker on the same line, IntelliJ IDEA still removes the marker together with the space and keeps the value in place:

Before:

```YAML
services:
  - <caret>nginx
```

After:

```YAML
services:
  <caret>nginx
```

> **Tip:**
> To break a line without adding a marker, disable the Automatically insert hyphen on enter option on the Editor | Code Style | YAML page   of the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))).

### Indentation

When you press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)), IntelliJ IDEA keeps the new line at the indentation level that matches the current structure:

* After a key that has no value, the new line is indented one level deeper.

* After a key-value pair, the new line stays at the same level.

* After a block scalar indicator (`|`), the new line is indented one level deeper, and the following lines stay at that level.

Before:

```YAML
database:<caret>
```

After:

```YAML
database:
  <caret>
```

Inside a block scalar, the new line lands at the standard block indentation, one level under the key. If the current line is over-indented manually, the new line still uses the standard block indentation instead of aligning with the over-indented text.

If you press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)) on a line that contains only whitespace below a completed entry, IntelliJ IDEA keeps the indentation that you set manually instead of re-aligning the new line.

When you type `-` followed by a space on an empty line in a sequence that has no items yet, IntelliJ IDEA corrects the marker indentation. With the Indent sequence value option on, the marker is placed one level deeper than the parent key; with the option off, the marker is aligned with the parent key. If the sequence already contains items, the marker keeps the current indentation. You can find this option on the Editor | Code Style | YAML page   of the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))).

### Brackets and quotes

In a key or value position, IntelliJ IDEA closes flow collections and quoted scalars automatically. When you type `[`, `{`, `"`, or `'`, IntelliJ IDEA inserts the matching character and places the caret between the pair:

Before:

```YAML
ports: <caret>
```

After typing [:

```YAML
ports: [<caret>]
```

Auto-closing applies only where the character starts a YAML structural token, such as a new key or value position or a point inside an existing flow collection. When the caret is within or directly after plain scalar text, IntelliJ IDEA inserts the character as ordinary text and closes nothing.

When you type a closing `]`, `}`, or quote right before the same character, IntelliJ IDEA moves the caret past it instead of inserting a duplicate. However, if the next character is an unpaired quote, typing the same quote character creates a new pair rather than moving over the existing one.

To delete an empty pair, press `Backspace` (Windows), `⌫` (macOS), `⌫` (IntelliJ IDEA Classic (macOS)), `⌫` (macOS System Shortcuts), `Backspace` (XWin), `Backspace` (GNOME), `Backspace` (KDE), `Backspace` (Emacs), `Backspace` (Sublime Text), `⌫` (Sublime Text (macOS)), `Backspace` (NetBeans), `Backspace` (Visual Studio), `⌫` (Visual Studio (macOS)), `Backspace` (Eclipse), `⌫` (Eclipse (macOS)) between the two characters, and IntelliJ IDEA removes both.

> **Note:**
> Parentheses (`()`) are plain characters in YAML, so IntelliJ IDEA neither closes nor types over them. Inside a block scalar, brackets and quotes are inserted as plain text and are not auto-closed.

### Moving keys and items

To move a key, a nested block, or a sequence item, place the caret on it and press `Ctrl+Shift+Up` (Windows), `⌘ ⇧ ↑` (macOS), `⌘ ⇧ ↑` (IntelliJ IDEA Classic (macOS)), `⌃ ⇧ ↑` (macOS System Shortcuts), `Ctrl+Shift+Up` (XWin), `Ctrl+Shift+Up` (GNOME), `Ctrl+Shift+Up` (KDE), `Ctrl+Shift+Up` (Emacs), `Ctrl+Shift+Up` (Sublime Text), `⌘ ⇧ ↑` (Sublime Text (macOS)), `Alt+Shift+Page Up` (NetBeans), `Ctrl+Alt+Shift+Up` (Visual Studio), `⌃ ⌥ ⇧ ↑` (Visual Studio (macOS)), `Alt+Up` (Eclipse), `⌥ ↑` (Eclipse (macOS)) or `Ctrl+Shift+Down` (Windows), `⌘ ⇧ ↓` (macOS), `⌘ ⇧ ↓` (IntelliJ IDEA Classic (macOS)), `⌃ ⇧ ↓` (macOS System Shortcuts), `Ctrl+Shift+Down` (XWin), `Ctrl+Shift+Down` (GNOME), `Ctrl+Shift+Down` (KDE), `Ctrl+Shift+Down` (Emacs), `Ctrl+Shift+Down` (Sublime Text), `⌘ ⇧ ↓` (Sublime Text (macOS)), `Alt+Shift+Page Down` (NetBeans), `Ctrl+Alt+Shift+Down` (Visual Studio), `⌃ ⌥ ⇧ ↓` (Visual Studio (macOS)), `Alt+Down` (Eclipse), `⌥ ↓` (Eclipse (macOS)). IntelliJ IDEA moves the whole entry, including its nested content, and keeps the indentation correct:

Before:

```YAML
services:
  web<caret>:
    image: nginx
  db:
    image: postgres
```

After:

```YAML
services:
  db:
    image: postgres
  web<caret>:
    image: nginx
```

If you select several entries, IntelliJ IDEA expands the selection to whole entries and moves them as a group.

> **Note:**
> This behavior applies only when you move the first entry of a mapping or sequence up, or the last entry down: there is nothing above or below it to swap with. You can still move the first entry down or the last entry up as usual.
>
>
>
> When you move the last entry down, only the key line with the caret moves down: that key line stays as an empty entry, and its former first child joins the preceding entry.
>
>
>
> When you move the first entry up, only the line with the caret moves up: it joins the preceding entry, and its parent key stays as an empty entry.

### Pasting

When you paste content into a YAML file, IntelliJ IDEA adjusts it to the target structure:

* Plain lines pasted into a sequence become separate items, each with its own `-` marker.

* If the pasted lines start with `-`, or mix prefixed and unprefixed lines, IntelliJ IDEA normalizes the markers so that each line has exactly one.

* A dotted path, such as `spring.datasource.url`, expands into nested keys.

* A multi-line block is re-indented so that its first line matches the caret indentation, while inner lines keep their relative indentation. Blank lines remain empty.

* When you paste directly in front of an existing key, IntelliJ IDEA re-indents the pasted block and keeps the existing key at its original column.

For example, paste `spring.datasource.url` at a mapping position:

Before:

```YAML
config:
  <caret>
```

After:

```YAML
config:
  spring:
    datasource:
      url:<caret>
```

To turn dotted-key expansion on or off, use the Auto expand key sequences upon paste option on the Editor | General | Smart Keys | YAML page   of the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))).

