有没有办法在 vs 代码资源管理器中展平或合并单文件夹文件夹? [英] Is there a way to flatten or merge single-folder folders in vs code explorer?

查看:41
本文介绍了有没有办法在 vs 代码资源管理器中展平或合并单文件夹文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道这种行为是否有名称.
我在 IntelliJ 中看到过,其中单文件夹文件夹在项目树窗格中统一或展平,而不是:

<预><代码>.├── pom.xml├── src│ ├── main│ │ ├── java│ │ │ └── com│ │ │ └── somepkg│ │ │ └── coreapi│ │ │ ├──控制器│ │ │ │ ├── AssetMutations.java│ │ │ │ ├── HomeController.java│ │ │ │ └── SessionsQuery.java│ │ │ ├── CoreApiApplication.java

你看:

<预><代码>.├── pom.xml├── src│ ├── main│ │ ├── java│ │ │ └── com.somepkg.coreapi│ │ │ ├──控制器│ │ │ │ ├── AssetMutations.java│ │ │ │ ├── HomeController.java│ │ │ │ └── SessionsQuery.java│ │ │ ├── CoreApiApplication.java

有没有办法让 vs 代码树视图文件浏览器以这种方式显示子文件夹?

解决方案

貌似在2019年6月的迭代计划中.

请参阅

I don't know if there's a name for this kind of behavior.
I've seen it in IntelliJ, where single-folder folders are unified or flattened in the project tree pane, where instead of:

.
├── pom.xml
├── src
│   ├── main
│   │   ├── java
│   │   │   └── com
│   │   │       └── somepkg
│   │   │           └── coreapi
│   │   │               ├── controllers
│   │   │               │   ├── AssetMutations.java
│   │   │               │   ├── HomeController.java
│   │   │               │   └── SessionsQuery.java
│   │   │               ├── CoreApiApplication.java

You see:

.
├── pom.xml
├── src
│   ├── main
│   │   ├── java
│   │   │   └── com.somepkg.coreapi
│   │   │       ├── controllers
│   │   │       │   ├── AssetMutations.java
│   │   │       │   ├── HomeController.java
│   │   │       │   └── SessionsQuery.java
│   │   │       ├── CoreApiApplication.java

Is there a way to make vs code tree-view file explorer to show subfolders this way?

解决方案

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.

这篇关于有没有办法在 vs 代码资源管理器中展平或合并单文件夹文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆