PyCharm 2019.3 Help

Complete paired characters

PyCharm can automatically add closing braces and other paired elements.

Finish code with closing braces

  1. In the Settings/Preferences dialog Ctrl+Alt+S, click General under Editor, and then Smart Keys. The Smart Keys page opens.

  2. Select the Insert pair } checkbox in the Enter group. This enables adding closing braces when you press Enter.

  3. Configure automatic insertion of paired elements by selecting the following check boxes:

    • Insert pair bracket
    • Insert pair quote
    • Auto-close tag on typing '</'
  4. Click OK to apply changes.

The indentation level is defined in the Code Style settings.

Last modified: 2 April 2020