Is there a way to flatten or merge single-folder folders in vs code explorer?

It looks like it is in the iteration plan for June, 2019.

See Iteration plan for June, 2019: release in July, 2019 and issue: merging single child directories.


Update: making it into v1.41 to be released in December, 2019. See https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_41.md#compact-folders-in-explorer

Compact folders in Explorer

In the File Explorer, we now render single child folders in a compact
form. In such a form, single child folders will be compressed in a
combined tree element. Useful for Java package structures, for
example.

Setting explorer.compactFolders controls this behavior. By default,
this setting is turned on.

So "explorer.compactFolders": false, will disable the feature.

compact folders demo

Leave a Comment