IntelliJ IDEA 2024.3 Help

Complete paired characters

IntelliJ IDEA can automatically add closing braces and other paired elements.

  1. Press Ctrl+Alt+S to open settings and then select Editor | General | Smart Keys.

  2. Configure the preferred options (all of them are enabled by default):

    • Insert paired brackets (), [], {}, <>

    • Insert pair quote

    • Insert pair %> on Enter in JSP

    • Insert pair '}' (in the Enter group). If enabled, IntelliJ IDEA will automatically add a closing brace once you press Enter.

    • Under the HTML/CSS node:

      • Insert closing tag on tag completion

      • Auto-close tag on typing '</'

      • Auto-insert closing }} and %} in Django templates (available if the Python plugin is installed)

  3. Click OK to apply changes.

The indentation level is defined in the Code Style settings.

Last modified: 07 March 2025