Search code examples
webstorm

Insert closing curly brace '}' when pressing enter in WebStorm


When I put an opening curly brace { and press Enter to make a new line, WebStorm automatically places a closing curly brace }. How can I stop this? I cannot find it in WebStorm's preferences:

Settings -> Code Style -> JavaScript -> Wrappings and Braces shows nothing relevant.


Solution

  • When pressing Enter:

    Settings | Editor | General | Smart Keys | Enter | Insert pair '}'

    In general:

    Settings | Editor | General | Smart Keys | Insert pair brackets (), [], {}, <>

    That's how you do it in PhpStorm and WebStorm.