Search code examples
javascriptreactjspycharmwebstormjsx

Disable auto {} insertion for React props in PyCharm


When I type props into my React component in PyCharm, it automatically inserts a pair of curly braces. Like so (cursor position is |):

<MyComp className=|

Becomes:

<MyComp className={|}

I've searched through the settings but didn't find a related setting to disable it. Does it exist?


Solution

  • You can disable braces auto-insertion by turning off "Add quotes for attribute value on typing '=' and attribute completion" in Settings -> Editor -> General -> Smart Keys

    But this will disable quotes auto-insertion for HTML too.