Complete paired characters
IntelliJ IDEA can automatically add closing braces and other paired elements.
Finish code with closing braces
Press Ctrl+Alt+S to open the IDE settings and then select
.Select the Insert pair '}' checkbox in the Enter group. This enables adding closing braces when you press Enter.
Configure automatic insertion of other paired elements by selecting these checkboxes:
Insert pair brackets (), [], {}, <>
Insert pair quote
Insert pair %> on Enter in JSP
Expand Smart Keys and select the HTML/CSS page. On this page, enable:
Auto-close tag on typing '</'
Auto-insert closing }} and %} in Django templates (available if the Python plugin is installed)
Click OK to apply changes.
The indentation level is defined in the Code Style settings.
Last modified: 11 February 2024