Prevent CLion from re-formatting code on close brace

If I have:

    <code>
    <more code>
    <some more code>

If I want to put `<more code>` in its own scope, I do:

    <code>
    {
    <more code>
    | <-- cursor position
    <some more code>

As soon as I hit `}`, CLion reformats `<more code>` according to its style guidelines.

I don't want it to do this. How do I prevent it from doing this?

 

2 comments

You need to switch off the option [ ] Reformat Block on typing '}'
The option is in File | Settings...| Editor | General | Smart Keys dialog.

Please, read more here:
https://www.jetbrains.com/help/idea/2016.1/smart-keys.html

0

Please sign in to leave a comment.