File Nesting
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!
fyi @bpasero
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
No plans at the moment. Closing until we reconsider this.
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.
Agree, at least ts + js + map files (for instance like webstorm does)
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.
Agree I wish file nesting like this (especially for ng2)
Html --css --ts -- etc ...
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
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.
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 [email protected] 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 https://github.com/Microsoft/vscode/issues/6328#issuecomment-249392536, or mute the thread https://github.com/notifications/unsubscribe-auth/ABzUP4LXESXZpGtY1iFZJmmy9J10k4-Uks5qta2DgaJpZM4IdUnr .
+1
any extension that may do the job?
Why is this closed? It's not implemented and would be a great feature.
@uxsoft
For some reason most other editors deemed this feature useful enough to implement it so why not vs code.
Maybe because they need a reason for people to use the real visual studio :-)
This should have not been closed, reopening. Though there might exist duplicates meanwhile.
@stevencl @chrisdias @seanmcbreen @egamma fyi we need some PM steering and guiding here if we want to turn the file explorer into a logical view. An initial PR was created by @playerx in https://github.com/Microsoft/vscode/pull/13754
My 2 cents at the moment: we should think about a solution for the scenarios our users want to solve and my feeling is that only supporting to show similar files in the same level below a root file is not enough. People may want something powerful as the solution explorer in VS.
@bpasero, my apologies, but question you asked is not correct. there are two different kind of features:
N1. Turn the file explorer into a logical view Example: you can link fileA ("directoryX/fileA"), to fileB, which is placed in directoryY
N2. Give file explorer support to show real files with more elegant way and give developers ability to enable this feature, example:

Feature N1 and Feature N2 are not the same, it's very important part here, they don't cover each other.
Thanks
@playerx I brought up the solution explorer because the description of this issue a reference to Visual Studio 2015 is made and to my knowledge there is only the solution explorer.
Independent from VS, our own project is putting all generated MAP and JS files into a out folder, not on the same level as the TS files and I am sure there are other projects that do the same. My point is that I would expect to nest those files under the TS files in the same way you do it when they are on the same level.
To me, nesting is not about grouping files with the same extension together, it is about showing files together that logically belong together (aka "derived resources"). Does that make sense?
@playerx N2 looks much better. For the angular 2 cli users, this should not require that naming convention. Maybe there could be some configurable pattern like in the hide files configuration.
Angular2 cli creates files like this:
my.component.ts my.component.html my.component.scss/css/less
@mbeckenbach good example, thanks
@bpasero nesting generated files, under TS files is great example, thanks
I want to ask everyone, let's put every possible practical example here (not theoretical please), that we would use in every day life and let's make solution based on that examples.
Let's the question be: How to make Explorer "smarter" to visualize real picture of files structure, with more elegant way?
@bpasero okey? I'm still trying not to mix Feature N1 and Feature N2.