- Home /
MonoDevelop indendation problems.
So basicaly after updating to Unity 5.3 and to MonoDevelop 5.9, I've started having problems with MonoDevelop's auto and/or smart indendation.
After copying anything to anywhere it always added one/two/three extra tabs, which was unnecessary. It also stopped behaving well if used the brackets like this:
void Anything() {
//Anything
}
instead of the deafult way. BUT, I've read a lot on forums and finally figured out a solution which I'm going to post here as an answer.
(Sorry if this was meant to be posted somewhere else, but it was bugging me so much I thought I should try to help other's after I've finally found the correct solution)
Answer by $$anonymous$$ · Jan 24, 2016 at 11:50 AM
First you have to set auto indendation smart in your MonoDevelop's config.
Monodevelop -> Preferences -> Text Editor -> Behaviour -> Indendation mode = smart
Then you have to set your Code Formatting's Policy to Visual Studio.
Monodevelop -> Preferences -> Source Code -> Code Formatting -> C# source code's policy = Microsoft Visual Studio
This will do the trick for new scripts, but for your older ones you need another step. Setting your solution's policy to Visual Studio too.
Solution settings -> Options -> Source Code -> Code Formatting -> C# source code's policy = Microsoft Visual Studio
That's all, you have to do to make it work. Hope I helped all of you with this problem !