GoLand 2023.2 Help

Complete paired characters

GoLand can automatically add closing braces and other paired elements.

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

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

  3. Configure automatic insertion of other paired elements by selecting these checkboxes:

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

    • Insert pair quote

  4. Expand Smart Keys and select the HTML/CSS page. On this page, enable:

    • Auto-close tag on typing '</'

  5. Click OK to apply changes.

The indentation level is defined in the Code Style settings.

Last modified: 30 November 2022