Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
5
Question by Reconnoiter · Feb 26, 2016 at 03:05 PM · monodevelopformatting

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.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image FatCatz · May 21, 2016 at 07:48 PM 0
Share

Ever managed to figure this out? I'm having the same annoyance.

avatar image Reconnoiter FatCatz · May 22, 2016 at 06:27 PM 0
Share

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.

3 Replies

· Add your reply
  • Sort: 
avatar image
3

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?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Reconnoiter · Mar 14, 2016 at 01:37 PM 0
Share

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.

avatar image
2

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: alt text

to this: alt text

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.


before-auto-format.png (7.2 kB)
after-auto-format.png (7.0 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

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. alt text Only if there is a comment on a "using" line, and it gets double wrapped.


monodevelopautformatcomments.png (4.2 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges