Csharp autocompletion is driving me crazy

I’m NOT talking about autocompletion for text, I’m talking about autocompletion for lines, it’s hard to explain, try to understand what i’m saying. :wink:

Hello! I’ve been looking through tutorials on YouTube in how to make games in Unity and so on…
I’ve always been using JavaScript for reasons.

Now i’ve started using Csharp and you know how if you write an if statement for example.

if(blabla > blabla) {
//HERE THE TEXT STARTS automatically when you press enter after you’ve wrote the if statement, right? It automatically helps you “tab” to make it look better. Hope you understand. BUT
}

This is how my MonoDevelop works in JavaScript, now I’ll try to explain how it looks like in Csharp.

//We write a function
public class Class : MonoBehaviour {

void Function() {
    //THis works fine. BUT! If i write an if-statement inside this little thing,it will start
         if(blabla > blabla) {
                     //It will start out somewhere around here???????????????+
    }
}

}

Now if i would continue doing if statements inside this ifstatement for example. The if statement would be forwarded even more.

I know it can be tough to understand, but i hope someone understands it, it’s driving me crazy, When i correct it. like:

void blabla() {
if(blabla) {

}

if(blabla) {

}

}

It works for the moment, but if i want to change some code in the function, it gets forwarded again.

I hope someone understand this nonsense since i’m not really good at explaining but since most people use Csharp, i might aswell start using it, but yeah it’s driving me crazy. What’s the problem? Thanks in advance

Hi to solve this go into your preferences and search through there for auto tabbing. It is a setting. You can turn off a lot for that. I prefer to have it as manual. I would be more detailed but I uninstalled my MonoDevelop and took the plunge to Visual Studio.

Found another thread that talks about this. I’ll quote Berzeger’s answer:

This was driving me nuts! But I found a fix – in MonoDevelop go to Tools → Options → Text Editor → Behavior and switch Indentation Mode from Smart to Automatic. Not so smart after all, huh? Kudos to BoNaNa from Unity forums who solved it.