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 has been archived by the owner on Dec 15, 2022. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
madakk
changed the title
Missing identation after a control statement without brackets
Missing indentation after a control statement without brackets
Dec 26, 2016
Prerequisites
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:
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
Expected behavior: Second line indentation level should be increased.
Actual behavior: Second line indentation level is the same.
Reproduces how often: 100%
Versions
Atom : 1.12.7
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0
apm 1.12.9
npm 3.10.5
node 4.4.5
python
git
visual studio 2013
Windows 8.1
Additional Information
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.
The text was updated successfully, but these errors were encountered: