Hi, I want to fold many parts of my code in monodevelop and I don’t have “+” squares and “fold” options are gray.
I programming in C#.
There is screen: ImageShack - Best place for all of your image hosting and image sharing needs
I made #region … #endregion and can’t find solution to get this.
This seems to be a known issue, it can be found in Unity’s Issue Tracker at:
Folding doesn’t work in Monodevelop 4 with Java for me.
How can I use #region … #endregion in Java?
Thanks!
I’m not sure if you can use region tags with javascript, or at least you used to not unless it’s been added and I’m unaware.
I don’t know how to do it in JS
In C#:
Tools → Options → Text Editor → General, and tick “Enable code folding”.
thanks Anlop…
Thanks guys. I was wondering how to do that. When I press enter though one of my regions keeps popping open. Does anyone know why this is? The region is the in the void Update() method if that means anything. However there is another region in the void update that does not open when I press enter anywhere in the code.
Do you mean Java for Android development? Because Unity doesn’t support Java.
JavaScript != Java … actually JavaScript in Unity != JavaScript; the language is actually called UnityScript. But most people (including UT ) call it JavaScript. Just remember it’s a different language than what you’re using on the Web.
It makes me sad because I just want code folding for Javascript functions so it’s easier to read. All well~
Just wanted to say I found out how from another site in case anyone is still wondering.
In MonoDevelop
Click Tools → Text Editor → General
Tick the box you wish regarding folding.
I tried that but it still doesn’t work. The text editor gets wider, but how do I fold code?
I realised code unflolds after saving. Is there any way of preventing this from happening?
It’s a bit annoying, as I tend to save a lot hahaha
I am also seeing this problem and it just generally makes it annoying to work with because I like to keep everything saved while I check over the stuff i’ve written… like a normal person
If you lose the ability to fold code after saving just make a small change, like pressing space somewhere then it should pop back up… to keep code folded through saving you can use #region I think it makes it a bit nicer to manage overall really. (Also you can set the options to automatically fold regions when you load a script in monodevelop)… which is very nice.
heres an update for this
Monodevelope:Preferances:TextEditor:General click the box to enable code folding(to have them closed after saving also check the box for fold on default)
TYVM
Cool thanks anlop! in new Monodevelop or OS X. Preferences → General