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.
Ever managed to figure this out? I'm having the same annoyance.
I havent worked enough with Unity+$$anonymous$$onodevelop yet to tell if this work around is good enough, but what I now do is just ignore the whole 'format document' and just only use the auto formatting when typping (so the automatic one) since only 'format document' seems to be doing this annoying thing.
Another work around would be using Visual Studio I quess, I heard good things about it and the Community addition seems to be free unless you are working for a company I think.
Answer by ksimon · Mar 01, 2016 at 05:15 PM
@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?
Hi ksimon, I haven't yet found a solution. I quess you could put all your comments in 1 block before the variables but its less clean. Hopefully Unity or monodevelop $$anonymous$$m will fix this.
Answer by Dan2013 · Aug 14, 2016 at 04:08 AM
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.
Answer by originalterrox · Apr 04, 2016 at 12:59 AM
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.
Only if there is a comment on a "using" line, and it gets double wrapped.
Your answer
Follow this Question
Related Questions
suggest word completion in scripts 0 Answers
Installing MonoDevelop 0 Answers
Monodevelop StyleCop integration 0 Answers
LeftHand Placement weapon manager 0 Answers
MonoDevelop can't find references for scripts in Editor folder 0 Answers