Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
5
Question by kromenak · Nov 17, 2013 at 11:24 PM · monodevelopformatting

Set Default MonoDevelop Formatting Options

A frustrating aspect of working with MonoDevelop is the way it can auto-format your code in ways that you don't want it to. When the auto-format works correctly, it is great. Otherwise, it feels like a constant struggle.

I've found that changing MonoDevelop's default policy formatting and tab width settings don't affect the solution generated by Unity. Additionally, while you can change the formatting and tab width settings for the solution after Unity generates it, Unity has a tendency to overwrite your solution and any custom settings regularly. This is particularly annoying to me because the default settings seem a bit wonky (an indent width of 8, really?).

Is there any way I can set Unity's default policy to different values? For code file templates, Unity has the templates available in the install directory, and you can overwrite them to create custom C# or JS templates, which I've found very useful. Are there any similar files for creating custom MonoDevelop solution settings? And if not, how are other people solving this issue when the default MonoDevelop formatting settings don't match the formatting settings you would like to use?

I should mention that this is using the "new" MonoDevelop (4.0.1), but I think it applies to the old one as well.

Comment
Add comment
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

3 Replies

· Add your reply
  • Sort: 
avatar image
10
Best Answer

Answer by sonicviz · Dec 01, 2013 at 09:26 AM

Actually I got back my old settings by doing the following: Project/Solution Options/Source Code/C# Source Code Set Policy to Microsoft Visual Studio and uncheck the use default settings from text file.

Setting general options Code formatting only applies to new projects so you have to change it under project solution options

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 kromenak · Dec 02, 2013 at 01:26 AM 0
Share

Cool, that seems to have the desired effect so far! I tried re-syncing the project a couple times and adding new code files. So far, the formatting settings are staying how I want them. Thanks!

avatar image
0

Answer by sonicviz · Dec 01, 2013 at 09:26 AM

I've found the same issue. No solution as yet. Pita.

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 tyoc213 · Jun 02, 2014 at 09:47 PM 0
Share

You will need to go to specific project settings, and later on, for each existent file hit CTRL+A then CTRL+I and finally CTRL+S if you want to apply for each file.

avatar image
0

Answer by FedericoCara · May 14, 2018 at 03:20 PM

How can I make Visual Studio to format code like Monodevelop (which is more compact)?

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

21 People are following this question.

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

Related Questions

monodevelop formatting policy to allow single-line 'if' statemetns? 2 Answers

Precompiler directives break MonoDevelop autoformat 0 Answers

MonoDevelop 4.0.1 auto (de)formatting 0 Answers

Indentation formatting issue in MonoDevelop-Unity 4.0.1 (Win7) 3 Answers

Stop Monodvelop adding new line when using attribute 1 Answer


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