Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Foldable Project ViewNew to Visual Studio Code? Get it now.
Foldable Project View

Foldable Project View

suq

|
10 installs
| (0) | Free
Fold and organize project root files in VS Code Explorer
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Foldable Project View

中文 | English


中文

在 VS Code 资源管理器中折叠和整理项目根目录文件,保持工作区整洁。

功能特性

  • 隐藏匹配文件 - 自动隐藏匹配 glob 模式的文件/文件夹
  • GitIgnore 支持 - 可选隐藏 .gitignore 中的文件
  • 全局与项目模式 - 支持全局模式(所有项目)和项目级模式
  • 快速切换 - 资源管理器工具栏一键切换折叠
  • 右键添加 - 通过右键菜单快速添加文件到折叠模式
  • 已折叠文件视图 - 在专用面板中浏览已隐藏的文件

使用方法

快速切换

点击资源管理器工具栏中的折叠图标即可启用/禁用折叠功能。

添加文件到模式

  1. 在资源管理器中右键点击任意文件或文件夹
  2. 选择 "添加到折叠模式"
  3. 文件将立即被隐藏

配置模式

打开设置,搜索 foldableProjectView:

  • Global Patterns - 全局模式,适用于所有项目(用户设置)
  • Patterns - 项目级模式,仅适用于当前项目(工作区设置)

模式示例

*.md
*.txt
.gitignore
LICENSE
node_modules
.vscode

配置项

配置项 说明 默认值
foldingEnabled 启用/禁用折叠 true
foldDirectories 对目录应用规则 true
foldIgnoredFiles 隐藏 .gitignore 文件 true
caseInsensitive 大小写不敏感匹配 true
globalPatterns 全局 glob 模式 []
patterns 项目级 glob 模式 []
viewLocation 视图位置(侧边栏/资源管理器) sidebar

命令

  • 切换文件折叠 - 开启/关闭折叠功能
  • 切换隐藏忽略文件 - 开启/关闭 .gitignore 隐藏
  • 刷新折叠 - 手动刷新折叠状态
  • 添加到折叠模式 - 将选中项添加到模式

English

Fold and organize project root files in VS Code Explorer, keeping your workspace clean and focused.

Features

  • Hide Matching Files - Automatically hide files/folders matching glob patterns from Explorer
  • GitIgnore Support - Optionally hide files ignored by .gitignore
  • Global & Project Patterns - Set patterns globally (all projects) or per-project
  • Quick Toggle - One-click toggle folding from Explorer toolbar
  • Right-Click to Add - Quickly add files to fold patterns via context menu
  • Folded Files View - Browse hidden files in a dedicated panel

Usage

Quick Toggle

Click the fold icon in Explorer toolbar to enable/disable folding.

Add Files to Patterns

  1. Right-click any file or folder in Explorer
  2. Select "Add to Fold Patterns"
  3. The file will be hidden immediately

Configure Patterns

Open Settings and search for foldableProjectView:

  • Global Patterns - Applied to all projects (User Settings)
  • Patterns - Project-specific patterns (Workspace Settings)

Pattern Examples

*.md
*.txt
.gitignore
LICENSE
node_modules
.vscode

Settings

Setting Description Default
foldingEnabled Enable/disable folding true
foldDirectories Apply rules to directories true
foldIgnoredFiles Hide .gitignore files true
caseInsensitive Case insensitive matching true
globalPatterns Global glob patterns []
patterns Project-specific patterns []
viewLocation View location (sidebar/explorer) sidebar

Commands

  • Foldable Project View: Toggle File Folding - Toggle folding on/off
  • Foldable Project View: Toggle Hide Ignored Files - Toggle .gitignore hiding
  • Foldable Project View: Refresh Folding - Manually refresh
  • Foldable Project View: Add to Fold Patterns - Add selected item to patterns

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft