- Home /
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. ;)
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
$$anonymous$$onoDevelop started doing that a version or two back. It used to be much better at that. I think of it as a bug.
(Sorry.)
@rutter So is this happening for everyone at the moment or what's the real problem here?
@Stabbarey Unfortunately, it's a bug for everyone. There might be a setting we can change to fix it, but I haven't really looked. I'll post back here if I ever find one.
Answer by brycem24 · Sep 03, 2014 at 10:14 PM
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.
Answer by rutter · Sep 03, 2014 at 10:15 PM
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.
Your answer
Follow this Question
Related Questions
Strange Glitch Whenever I First Open Unity 0 Answers
Problem with editor 1 Answer
Problem with touch 1 Answer