Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Monodevelop how to stop auto indenting

Discussion in 'Scripting' started by elvirais, Jun 11, 2017.

  1. elvirais

    elvirais

    Joined:
    Nov 13, 2013
    Posts:
    29
    I've been trying to turn off auto-indenting but I just can't do it. I've looked through older discussions (like https://forum.unity3d.com/threads/monodevelop-annoying-auto-indentation.213464/ ) but so far to no avail. It's driving me up the wall. At first I just wanted to adjust it to my needs but I've given up, would just like to turn it off so i'll indent manually. Any ideas?
    (latest Unity / Monodevelop 5.9.6 )
     
  2. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,583
    Actually, I'd like to know about this as well, I don't particularly like the way monodevelop indents things and in some cases I think it makes things more difficult to read. Especially if you happen to be using quite a few if and else statements within each other because it just clumps them altogether in a thoughtless way.

    Edit: May have found the answer, going to try this.

    http://answers.unity3d.com/questions/746832/how-to-disable-monodevelop-auto-format.html

    Edit 2: Just tried it and it seems to work! Turn off on the fly code formatting in the text editor behaviour settings and it will stop it.
     
    Last edited: Jun 11, 2017
  3. elvirais

    elvirais

    Joined:
    Nov 13, 2013
    Posts:
    29
    Update: in Options - Text Editor - behavior, as mentioned already, turn off on the fly formatting, but I also needed to turn off the "Smart" indentation. I set it to "Automatic"and that has saved my sanity :)
     
    Kixerus likes this.