• 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
0
Question by HomeSpunGames · Apr 02, 2012 at 01:31 PM · javascriptmonodevelopformatauto

MonoDevelop auto formating?

I am using MonoDevelop to write and edit JavaScript code for a game I am working on. I hear that MonoDevelop can auto format your code, but I have tried everything and cant figure out how! The only answer I could find is to use the Format > Format Document, which does not do anything.

Thanks in advance!

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

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by rutter · Apr 03, 2012 at 03:12 AM

MonoDevelop includes some pretty elaborate formatting rules for C#. I'm not aware of any built-in mechanism for JavaScript. You can check this for yourself, by going into your solution settings:

 Project > Solution Options > Source Code > Code Formatting
Comment
Add comment · Show 2 · 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 AmbroseFurback · Apr 01, 2013 at 01:41 PM 1
Share

I have tried setting those rules but they don't appear to work (for c#).

avatar image sergiobd · Jul 19, 2015 at 02:40 AM 0
Share

They do work for me (in c#). You can also set a key binding in tools > options > key-bindings. Bear in mind that if you have syntax errors in your code, like missing a parenthese, monodevelop will not be able to auto-format.

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

UnityScript auto-format? 0 Answers

Script copied exactly, yet I get the console errors 1 Answer

Random.Range HELP!!! 2 Answers

Make an object move in the direction of touch 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges