Skip to content

File NestingΒ #6328

Closed
Closed

Description

@ciel

Is there any possible chance we might see File Nesting in Visual Studio Code the same way it works in Visual Studio 2015? It was really convenient and helpful. I would adore such a feature!

Activity

  1. isidorn commented on May 12, 2016

    @isidorn
  2. ciel commented on May 13, 2016

    @ciel
    Author

    The most ideal scenario for this is that anything that starts with the same text as a parent file, minus the extension gets nested, like this;

    File1.cs
    --- File1.File2.cs
    --- File1.File3.cs
    ------ File1.File3.File4.cs
    
  3. bpasero commented on Jul 15, 2016

    @bpasero
    Contributor

    No plans at the moment. Closing until we reconsider this.

  4. playerx commented on Jul 19, 2016

    @playerx

    This is important feature for large projects. I'm using asp.net vNext for Angular project and now I've following structure automatically (by naming):

    src
    --app.component.ts
    ----app.component.ts.sass
    ----app.component.ts.html
    --login.component.ts
    ----login.component.ts.sass
    ----login.component.ts.html
    

    In VS Code Explorer I got:

    src
    --app.component.ts
    --app.component.ts.sass
    --app.component.ts.html
    --login.component.ts
    --login.component.ts.sass
    --login.component.ts.html
    

    Creating folders for each component is bad solution for angular project (you will need to change references).

    We need this feature to move to VS Code.

  5. serhiisol commented on Aug 5, 2016

    @serhiisol

    Agree, at least ts + js + map files (for instance like webstorm does)

  6. CreepGin commented on Aug 21, 2016

    @CreepGin

    It would be great to have file nesting for ts + js + map + style.

    Currently we are hiding the .js and .map files which makes checking them an annoyance. Even with just ts + css, the sidebar still feels bloated.

  7. wupaz commented on Sep 11, 2016

    @wupaz

    Agree I wish file nesting like this (especially for ng2)

    Html
    --css
    --ts
    -- etc ...

  8. uxsoft commented on Sep 15, 2016

    @uxsoft

    Please reconsider this! This is such an important issue.

    Theres so many cases where generated files just clutter the workspace. Typescript! Typescript which you use as well! is a prime example. Or LESS/SASS -> css. Or Jade -> Html

  9. ajsheehan commented on Sep 24, 2016

    @ajsheehan

    There is the option to conditionally hide the generated files. For example:

    "files.exclude": {
        "**/*.js": {"when": "$(basename).ts"}
    }
    

    This same principal could be applied to your css and map files.

  10. uxsoft commented on Sep 24, 2016

    @uxsoft

    And i am using that option. The problem arises when i want to see the
    hidden files. Also its not clear whether the hidden files are actually
    there (that the generation is working...), which makes me open the folder
    in explorer where the files are also not grouped... another thing is that
    some of my collegues arent comfortable with not seeing half the files in
    the project and we would like to use the same settings for the whole team.

    For some reason most other editors deemed this feature useful enough to
    implement it so why not vs code.

    I would like to note that this is really not a complicated feature. Im
    pretty sure it can be done in a day. (I was thinking about making a pull
    request but it might require some small changes to the architecture around
    FileStat)

    On Sunday, September 25, 2016, Andrew Sheehan notifications@github.com
    wrote:

    There is the option to conditionally hide the generated files. For example:

    "files.exclude": {
    "*/.js": {"when": "$(basename).ts"}
    }

    This same principal could be applied to your css and map files.

    β€”
    You are receiving this because you commented.
    Reply to this email directly, view it on GitHub
    #6328 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/ABzUP4LXESXZpGtY1iFZJmmy9J10k4-Uks5qta2DgaJpZM4IdUnr
    .

  11. 195 remaining items

  12. coeur85 commented on Jan 20, 2022

    @coeur85

    The latest Insiders contains several explorer.experimental.fileNesting.* settings. Feedback appreciated!
    (As this is experimental stage, expect bugs. ❀️ to any πŸ› reports that include a repo link, reproduction steps, and a screen recording!)

    would you car you give an example of how it works ?

    never mind i figured it out , thank you :)

  13. tjx666 commented on Jan 25, 2022

    @tjx666
    Contributor

    Just set:

    "explorer.experimental.fileNesting.enabled": true,
    
  14. heartacker commented on Jan 25, 2022

    @heartacker
    Contributor

    is there any API for language server to nest file?
    for example:
    .cpp/.h is used for cpp-tools https://github.com/microsoft/vscode-cpptools
    .xaml/.xaml.cs is used for C# WPF

  15. JacksonKearl commented on Jan 25, 2022

    @JacksonKearl
    Contributor

    heartacker no, though you can configure that in your settings with something like:

    "explorer.experimental.fileNesting.patterns": {
      "*.cpp": "$(capture).h",
      "*.xaml": "$(capture).xaml.cs"
    }

    Alternatively, "*": "$(capture).*" for the general "addedExtension" case (in VS parlance).

    Closing this out as the feature is released and will be available in the next stable release (in around 1 week). Please do continue to provide feedback in new issues, I'll remove this from experimental scope when I feel confident that the implementation meets general expectations.

  16. marsen commented on Jan 25, 2022

    @marsen

    So good to hear this feature implemented,
    I can't wait, where can I have a try with the trial version?

    ❀️

  17. trane77 commented on Feb 5, 2022

    @trane77

    It looks like it's reported in the 1.64.0 changelog (experimental feature):

    image

  18. davidgabrichidze commented on Feb 22, 2022

    @davidgabrichidze

    Wouldn't it be more UX-friendly if nested files will move with the parent one when I change the location of the parent file?
    (e.g., drag and drop, or copy-paste).

    It would be the same experience when I change the folder's location, including its content.

  19. IllusionMH commented on Feb 22, 2022

    @IllusionMH
    Contributor

    David Gabrichidze (@davidgabrichidze) looks like great request, however I think it's better to create new issue for it instead of piling on 6 years old closed issue.

  20. davidgabrichidze commented on Feb 22, 2022

    @davidgabrichidze

    Andrii Dieiev (@IllusionMH) Yes, indeed, good idea.

    I've created one #143632

  21. selrond commented on Mar 8, 2022

    @selrond
    Contributor

    Is there any way for custom file icons to indicate the nesting besides showing the arrows (which many hide in favor of custom folder icons)?

    See https://github.com/moxer-theme/moxer-icons-code/issues/40

  22. JacksonKearl commented on Mar 8, 2022

    @JacksonKearl
    Contributor

    Sebastian Andil (@selrond) looking into that this iteration, likely going to force arrows to show for nests even if they don't for folders.

  23. pichayean commented on Mar 11, 2022

    @pichayean

    Thk
    image

  24. locked and limited conversation to collaborators on Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestRequest for new features or functionalityfile-explorerExplorer widget issueson-testplanuxUser experience issues

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions