• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker How to hide comments in the script?

Suzaku

Member
It would be good if I could hide all my comments in the script using a hotkey or any other quick trick, this way when we are not needing to read any comments in the script we hide them so the script will be more readable and clean. Is that possible? Thank you.
 

rIKmAN

Member
we hide them so the script will be more readable and clean.
The whole point of comments is to make your code more readable / understandable and remind you what a certain piece of code does should you come back to it later.

You can't hide them, but if you wanted to you could enclose them in #region / #endregion tags and then use CTRL+M and CTRL+U to fold / unfold all regions. (CMD+M / CMD+U on Mac)
 

samspade

Member
What @rIKmAN said. I use regions a lot. Not only can use CTRL + M/U to fold/unfold you can use CTRL + up/down to move to the next one up or down and CTRL + enter to toggle open/close on that specific region.

If your comments are so bothersome you want to hide them, you might want to re-think your comment practice. There are tons of videos, articles out there about how to comment your code. I'd recommend reading/watching a bunch and coming up with a system you like.
 
Top