I prefer my code to be more compact but JetBrains Rider (or any IntelliJ based editor) automatically formats it like this:
void Start()
{
}
How can I change it to the following by default?
void Start() {
}
CodePudding user response:
You should not configure this thing manually in settings, just allow Rider to "learn" from your code.
- Format code block as you like
- Select desired code block and invoke
Reformat and cleanup...
->Detect code style settings...
fromalt enter
menu:
- Observe changes which Rider detects:
- Save settings for all solutions on this machine, or just for the specific (current) solution. There are other options also:
- Now your IDE is configured to format code exactly you want :)
P.S. This thing works in JetBrains Rider and R# tools, do not know about other IDEs, probably there you have to find the same settings manually.