IntelliJ IDEA 2017.3 Help

Completing Punctuation

On this page:


In the Editor, you can configure the editor's behavior related to the paired braces. When the option Insert pair } is enabled, the closing brace is automatically added with indent on pressing Enter. Indentation level is defined in the Code Style settings.

Configuring paired elements behavior

To configure insertion of paired elements

  1. Press Ctrl+Alt+S or choose File | Settings (for Windows and Linux) or IntelliJ IDEA | Preferences (for macOS) on the main menu, and then go to Editor | General | Smart Keys.
  2. Configure automatic insertion of paired elements by selecting the following checkboxes:
    • Insert pair bracket
    • Insert pair quote
    • Auto-close tag on typing '</'
    • Insert pair %> in JSP
  3. To have the closing braces inserted upon pressing Enter, select the Insert pair } checkbox.
  4. Apply changes and click OK.
Last modified: 6 March 2018

See Also