MonoDevelop Mac

Hey.

I’ve used the build-in MonoDevelop for a while know, and there are a think that I’m missing. It is that I’m not able ti collapse for example the comments. So if i write:

/* Example on if statement

if (anything)
{
blah blah blah
}

*/

I would like to know if I can collapse the comment to just the first line so it’s faster to scroll down and look though the code

This is a comment and not an answer

3 Answers

3

Open the preferences window (CMD+,) and go to Text Editor / General. There you have to check Enable code folding and Fold comments by default

I’ve tried that but it’s still not working :frowning:

It’s not exactly a fix, but there’s a decent work-around that works in JavaScript. I’m running MonoDevelop 2.4.2 with Unity 3.4.2f3, which to my knowledge is the latest version. Set up your code as follows:

/*
function Update()
{
    var yourCode = whatEver
}
*/

function Update()
}
    var moreCode = stuff
}

After adding the second function Update() {} you’ll see a bar and + at the left that encompasses the first set of code within the {} of the first function Update. That’ll let you collapse that for more convenient viewing, while putting the /* / before and after will prevent it from being compiled. Also, it seems both / */ will be within the collapsed area, so they won’t take up space either.