colon of initialization lists in seperate line

I love your tool and especially the code formatting part of it, but I think it has a bug (or at least I am not able to find the correct option for it).

This short codes shows what's going wrong:


As you can see, the colon of the class inheritance list is perfectly formatted but the member initialization list is a little bit weird. The formatter puts the colon in a separate line, but I would like to see it behind the Bar(). I can't find a property to adjust that, can you please help me out?





Sorry for the late reply. You are probably looking for the "Line breaks and Wrapping | Place on New Line | Break line before member initializer list" formatting option. To have formatter put the colon on the same line as Bar you need to set this option to "Force put on single line".



Thanks for your reply. Unfortunatly this doesn't fix it properly.

Now it looks like this:

Do you have any other ideas to solve this?




Just put 'x' on a new line and R++ will keep it there. 

To do this automatically, we need a new option for line break after the colon (in addition to the option for line break before the colon). I've created a feature request



Please sign in to leave a comment.