How to prevent that monodevelop format moves comments to next line?

Hello Unity community,

Monodevelop seems to move comments I wrote behind single line codes (e.g. behind variables) to the next line. E.g. it makes this:

public float use_gravity = -4.0f; //my comment

To this:

public float use_gravity = -4.0f; 
//my comment

I already tried finding the right format option under ‘project’ → ‘solution options’ → ‘code formatting C#’, but cannot seem to find the line that alters this. Anyway to change this?

Thanks in advance.

@Reconnoiter I am having the same issue, it sucks that a comment for a variable gets moved to the next line making it seam as though the comment is for the next variable. Have you figured a way to stop it?

Every time I do auto formatting, MonoDevelop moves comments to a new line.

Change this:

to this:

This issue is very annoying.

After checking all editing options, I still do not know how to turn this off.

Is this a bug of current MonoDevelop? I did tests on both Unity 5.3 and 5.4.

I found that you can change the Code Formatting Policy to K&R style to avoid most of the weird formatting. But I still get wrapped comments in the header area, see screenshot. 67239-monodevelopautformatcomments.png Only if there is a comment on a “using” line, and it gets double wrapped.