# Feature request: toggle comments on/off

**URL:** <https://discourse.processing.org/t/feature-request-toggle-comments-on-off/27720>\
**Category:** p5.js\
**Created:** [February 11, 2021, 12:25am UTC](https://discourse.processing.org/t/feature-request-toggle-comments-on-off/27720 "2021-02-11T00:25:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmacdonald](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@rmacdonald](https://discourse.processing.org/u/rmacdonald)\
**Post date:** [February 11, 2021, 12:25am UTC](https://discourse.processing.org/t/feature-request-toggle-comments-on-off/27720/1 "2021-02-11T00:25:06Z")

</div>

When I create sample code for my students, I often include lots of comments for them, and it would be amazing if there was a simple way to toggle those comments on and off. Once students have processed the comments, hiding them and seeing a streamlined and uncluttered version of the code would be helpful.

If that feature existed, I also suspect that students might be more inclined to add comments to their own code more often.

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [February 11, 2021, 12:59am UTC](https://discourse.processing.org/t/feature-request-toggle-comments-on-off/27720/2 "2021-02-11T00:59:19Z")

</div>

Hi,

Welcome to the forum! 😉

Which code editor are your students using? Do they use the p5 web editor?

Because depending on the IDE, there might be functionalities to hide comments :

- This is still open on VSCode : [https://github.com/microsoft/vscode/issues/46505](https://github.com/microsoft/vscode/issues/46505)

- For Sublime : [How to hide comments - Technical Support - Sublime Forum](https://forum.sublimetext.com/t/how-to-hide-comments/3836/16)

- On JetBrains products (collapse doc strings): [Is there any way to collapse just comments? – IDEs Support (IntelliJ Platform) | JetBrains](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206834215-Is-there-any-way-to-collapse-just-comments-)

- Atom : [fold-comments](https://atom.io/packages/fold-comments)

- Brackets: [GitHub - thehogfather/brackets-code-folding: Code folding extension for brackets IDE](https://github.com/thehogfather/brackets-code-folding)

- Emacs: [EmacsWiki: Hide Or Ignore Comments](https://www.emacswiki.org/emacs/HideOrIgnoreComments)

And in the [p5 web editor](https://editor.p5js.org/), you can fold functions, blocks and **multiline comments** but not single line comments. Feel free to open an issue on GitHub for a feature enhancement :

> **[processing/p5.js-web-editor](https://github.com/processing/p5.js-web-editor/labels/type:feature)**
>
> s/type:feature
