microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.44k stars 28.1k forks source link

[folding] fold only code #208368

Open YkTru opened 3 months ago

YkTru commented 3 months ago

Does this issue occur when all extensions are disabled?: Yes

What I want: No comment folding at any level, only code

What I have at folding level 2 (it seems there's an autofold (?)): 1

What I want at folding level 2 (ie no comment folding): 2

Is there a way, extension? Thank you

ctwhome commented 3 months ago

That'd be awesome, I can't even emphasize how many times I fold all k+0 and then have to go comment by comment opening them. Thanks!

VSCodeTriageBot commented 3 months ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

aeschli commented 3 months ago

If I understand right, this would mean the duplication of most of the existing fold commands (Fold, Fold Level X, ...).

TBH, I'm not too keen to add more commands.

YkTru commented 3 months ago

@aeschli

IMO the ideal would be a "Toggle fold for comments" that would require only one command

In F#, it's common to have over 800 lines of code in a single file, and comments are often used to organize the code (until the creation of a module is required). The ability to navigate (fold/unfold) quickly and easily is also of the utmost importance, so I don't want to spend half my time manually unfolding comments since I often use different levels of folding.

eg: I find it quite annoying that in VSCode every time I "upfold" then "downfold" it automatically hides my "Helpers" comments if I put them at the beginning of a module, or that my multiline comments (often containing important "todos", or "impl/design ideas") are folded by default.

Does anyone have similar problems?

Thank you

YkTru commented 3 months ago

@aeschli Do you think a "Toggle fold for comments" would be reasonably feasible and appropriate? Thank you

I also forgot to mention that when working in a team, it's very useful to make sure that "todo" and other tags are immediately visible, otherwise they may go unnoticed.

VSCodeTriageBot commented 2 months ago

:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

YkTru commented 2 months ago

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Great thanks everyone!