Skip to content

Ability to collapse commented code chunks with gutter toggle #2800

@enzotar

Description

@enzotar

Is your feature request related to a problem? Please describe.
When refactoring code, I often comment out large sections. This makes for a lot of scrolling to see the working code.

Describe the solution you'd like
Similar to how classes and functions have a collapse toggle in the gutter, I would like to collapse blocks of commented code.

Describe alternatives you've considered
I sometimes leave the function or class and only comment the content. But sometimes that is not convenient.

Additional context
The first line of the commented block could be used as the summary of the collapsed chunk. And with some visual feedback to show the collapse/more lines available

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions