vscode icon indicating copy to clipboard operation
vscode copied to clipboard

File Nesting

Open ciel opened this issue 10 years ago • 202 comments

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!

ciel avatar May 12 '16 17:05 ciel

fyi @bpasero

isidorn avatar May 12 '16 19:05 isidorn

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

ciel avatar May 13 '16 09:05 ciel

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

bpasero avatar Jul 15 '16 07:07 bpasero

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.

playerx avatar Jul 19 '16 11:07 playerx

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

serhiisol avatar Aug 05 '16 16:08 serhiisol

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.

CreepGin avatar Aug 21 '16 19:08 CreepGin

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

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

wupaz avatar Sep 11 '16 02:09 wupaz

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

uxsoft avatar Sep 15 '16 14:09 uxsoft

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.

ajsheehan avatar Sep 24 '16 23:09 ajsheehan

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 .

uxsoft avatar Sep 24 '16 23:09 uxsoft

+1

RizwanAslam avatar Sep 30 '16 22:09 RizwanAslam

any extension that may do the job?

canda avatar Oct 05 '16 14:10 canda

Why is this closed? It's not implemented and would be a great feature.

MarcelMalik avatar Oct 06 '16 19:10 MarcelMalik

@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 :-)

mbeckenbach avatar Oct 08 '16 07:10 mbeckenbach

This should have not been closed, reopening. Though there might exist duplicates meanwhile.

bpasero avatar Oct 14 '16 14:10 bpasero

@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 avatar Oct 14 '16 14:10 bpasero

@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: 8aa29120-922e-11e6-9931-c6b2200a7940

Feature N1 and Feature N2 are not the same, it's very important part here, they don't cover each other.

Thanks

playerx avatar Oct 15 '16 19:10 playerx

@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?

bpasero avatar Oct 16 '16 05:10 bpasero

@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 avatar Oct 16 '16 06:10 mbeckenbach

@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.

playerx avatar Oct 16 '16 06:10 playerx