Search code examples
rider

Rider multiline statement alignment: How to change the default alignment?


I cannot figure out how to tell Rider not to align the lines of a multiline statement. Instead of this (what Rider does by default):

Console.WriteLine("Hello " +
                  "World!");
var result = 1 +
             2 +
             3;

I want this:

Console.WriteLine("Hello " +
    "World!");
var result = 1 +
    2 +
    3;

Which setting do I need to set to achieve my goal? If not in Rider: Is there any .editorconfig setting I can use?


Solution

  • I guess you'd need these 2 settings here

    enter image description here

    and if you prefer to leave your operators on the same line - another one.

    enter image description here