MBeautifier icon indicating copy to clipboard operation
MBeautifier copied to clipboard

Indentation in multiline condition.

Open mike-live opened this issue 7 years ago • 4 comments

I assume that in the case of a condition, it is better to align to condition on previous line. I think this code:

if a + b > 0 && ...
   a * b > 0
    a = b;
end   

better than generated by MBeautifier:

if a + b > 0 && ...
        a * b > 0
    a = b;
end

So, this is true for while too.

mike-live avatar Jan 15 '18 07:01 mike-live

The problem here is the same that with #51 : it relies on Smart Indent functionality of editor. Maybe in v2.0alpha this can be implemented.

davidvarga avatar Jan 15 '18 09:01 davidvarga

is it possible to replace multiline by in-lining instead? how to set such a configuration ?

orwel1984 avatar Dec 21 '18 14:12 orwel1984

The inlining of continous lines (...) would be theoreti cally possible to be implemented (currently it is not implemented). I open a separate card for it.

EDIT: Done - #58.

davidvarga avatar Dec 21 '18 16:12 davidvarga

The in-lining has been implemented in #58 : it is disabled by default though.

davidvarga avatar Feb 10 '19 12:02 davidvarga