Monodevelop Indentation issue

I have an annoying indentation issue with MonoDevelop 4.0.1

I can’t explain well what is happening, so here are 2 pics of the problem:

I manually write that:

1590700--95455--$issue1.png

then, once i close the function with curly brackets, it does that:

1590700--95456--$issue2.png

basically, it is adding 2 indentation on the content of the function, and 1 indentation before the bracket.

It is very annoying because every time i have to manually remove those indentations… i like to have my code well organized.

How i can fix this?

I don’t know. It’s so annoying that I decided to buy Visual Studio instead, as I was spending quite a bit of time fixing the indentation to be readable, rather than just programming. I can’t imagine how they let it get so screwed up.

Is it perhaps not indented within a parent block?

Monodevelop will want to format this:

public class Foo : MonoBehaviour {

void Start() {
    DontDestroyOnLoad(this);
}

}

Like this:

public class Foo : MonoBehaviour {

    void Start() {
        DontDestroyOnLoad(this);
    }

}

So if your cursor is at the end of the DontDestroyOnLoad(this); line and you press Enter, it will indent enough to format the next line the way it thinks the whole thing should be formatted.