VS Code region/block comment folding

This topic contains 1 reply, has 2 voices, and was last updated by  Ivan 3 months, 3 weeks ago.

  • Author
    Posts
  • #73996

    Kevin Greer
    Participant

    I'm giving VS Code a try and am trying to figure out why block folding for comments and regions is not working. I figured out they do fold only if all the contents between and #region #endregion is indented. To comment out a block of code or region I had to [Alt]+[SHIFT] the selection and insert a tab or a few spaces to indent all lines from the leading and trailing block. Is there a specific setting I'm missing?

    If I should not ask this here, my apologizes.

    VS Code 1.13.1 and PowerShell extension 1.4.1

    Not collapsible

    
    
    #region test
    Write-Output Hello World
    #endregion
    

    Collapsible

    
    
    #region test
        Write-Output Hello World
    #endregion
    
  • #74000

    Ivan
    Participant

    You need at least 1 space for the region to collapse.

    #region test
     Write-Output Hello World
    #end region
    

You must be logged in to reply to this topic.