I'm working on my coding skills and have been running into issues with spacing in my code. For instance, after writing conditional statements like this:
```javascript
if (i 0){
if (i > 10){
exit; //this
} //and that
}
```
Is there a way to automatically fix these spacing issues? As I'm a beginner, manually adjusting every instance is overwhelming, especially since my project has grown quite large. Any help would be greatly appreciated!
4 Answers
Most IDEs have a 'reformat code' command. You can find it in the settings and customize how you want your code to be styled. It's not fully automatic, but running this command on your whole file is a huge time-saver!
What editor or IDE are you using? That can really change how you approach fixing spacing issues!
Highlight both lines of code and hit the *tab* key. This will help you adjust the spacing manually! But if you're looking for something more automatic, keep reading.
If you're using IntelliJ IDEA, you can easily auto-format your code by pressing CTRL + ALT + L. It’ll take care of the spacing issues for you!

Hey, thanks! But is there no way to just auto-format everything? I’ve rewritten my project several times and it's too big to fix everything manually, it would take forever!