Skip to content

Preprocessor block folding #1584

Closed
Closed

Description

@kevinmoran
void foo()
{
    int x = 10;
#if 0
    int y = x;
#else
    int y = x + 1;
#endif
    // etc.
}

If I try to collapse foo() in VSCode it will only fold as far as #if 0 due to the tab alignment. Aligning preprocessor statements to the left regardless of the alignment of the block itself is an extremely common style. It would be lovely if code folding understood that they are inside a function and should be folded with it.

Activity

  1. sean-mcmanus commented on Feb 20, 2018

    @sean-mcmanus
    Contributor

    I don't believe we can implement this yet -- see microsoft/vscode#3422 .

  2. sean-mcmanus commented on Apr 26, 2018

    @sean-mcmanus
    Contributor

    We're tracking this with #407 .

  3. locked and limited conversation to collaborators on Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions