This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Indentation for single-statement bodies inside "for", "while", and "if" #96
Open
Description
Hi,
The following code is auto-indented in Atom:
if (x == 0)
y = 0;
else
y = 1;
If you give a one-line statement after a for, while, or if (or else), it would be cool if the auto indent did the right thing:
if (x == 0)
y = 0;
else
y = 1;
Right now, you've got to use braces to get the correct indentation.
Was it decided to do things this way, or is this something you'd like changed? If so, I'm happy to try to fix it. I assume it requires editing the c.cson grammar file?
Dave