How do I make braces to auto-align the cursor

Answered

Hello, on my computer the cursor do not auto-align automatically after adding braces:

https://giphy.com/gifs/xUPGcfa4ofM30bYVmU

 

On a friend PC it seems to work very well.

https://giphy.com/gifs/xUPGcoifTE72YvhHXy

 

So after adding braces, I want to press Enter and the cursor should go to next line and then move 4 spaces. What is the setting for this?

Thanks

3 comments

Hi!

 

It should work with File | Settings | Editor | General | Smart Keys | Enter | Smart Indent enabled.

0

Another thing could be that you're pressing Enter while code isn't analysed yet. Please check that you don't have the "eye" blinking in the top right corner.

0

Great, it works!

Thanks Maria.

0

Please sign in to leave a comment.