You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Missing indentation after a control statement without brackets #476
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
If you type a control statement without opening brackets and hit enter, the indentation level is maintained rather than being increased one level:
I suspect this could be desirable if one was using brackets "BSD" style:
if (2>1)
{
code;
}
Which I think could be handled by detecting the open bracket at the beggining of the line and immediately decreasing indentation. I don't know if the core supports this type of behavior, I'm not aware of the specifics of how auto indentation works. Otherwise, this could also be a setting for your preferred indentation style.
Steps to Reproduce
Type `if (2>1)``
Press enter
Expected behavior: Second line indentation level should be increased.
Actual behavior: Second line indentation level is the same.
Furthermore, there's a related issue with the indentation of closing brackets involving a similar situation:
This appears to be because the closing bracket always decreases indentation by one level. The correct behavior should be to return to the indentation level of the opening bracket, regardless of the current indentation. Again I'm not sure if this is a language-javascript level issue, or a more general core issue.
changed the title [-]Missing identation after a control statement without brackets[/-][+]Missing indentation after a control statement without brackets[/+]on Dec 26, 2016
Activity
[-]Missing identation after a control statement without brackets[/-][+]Missing indentation after a control statement without brackets[/+]winstliu commentedon Dec 31, 2016
Your second bug in the additional information section is a more general core issue.
patrickjane commentedon Oct 26, 2017
Any news on this bug?