Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[folding] fold only code #208368

Open
YkTru opened this issue Mar 22, 2024 · 7 comments
Open

[folding] fold only code #208368

YkTru opened this issue Mar 22, 2024 · 7 comments
Assignees
Labels
editor-folding Editor code folding issues feature-request Request for new features or functionality
Milestone

Comments

@YkTru
Copy link

YkTru commented Mar 22, 2024

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
Copy link

ctwhome commented Mar 23, 2024

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!

@aeschli aeschli changed the title Comments folding: is there a way to fold actual code only? [folding] fold only code Mar 25, 2024
@aeschli aeschli added editor-folding Editor code folding issues feature-request Request for new features or functionality labels Mar 25, 2024
@aeschli aeschli added this to the Backlog Candidates milestone Mar 25, 2024
@VSCodeTriageBot
Copy link
Collaborator

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
Copy link
Contributor

aeschli commented Mar 25, 2024

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
Copy link
Author

YkTru commented Mar 26, 2024

@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
Copy link
Author

YkTru commented Mar 27, 2024

@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.

Tyriar added a commit that referenced this issue Mar 28, 2024
Since we generally want to expose all paths as URIs (unless user-provided
paths), we will only expose this as a URI. This means extensions are
potentially missing out on important information which they may be able
to handle (eg. SSHing in the terminal), but this is a small edge case and
if the extension really wanted to handle it they should be able to parse
the sequences themselves in the future via onDidWriteTerminalData.

Part of #208368
Tyriar added a commit that referenced this issue Mar 28, 2024
@VSCodeTriageBot
Copy link
Collaborator

🙂 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
Copy link
Author

YkTru commented Apr 18, 2024

🙂 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-folding Editor code folding issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants