Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Folder SearchNew to Visual Studio Code? Get it now.
Folder Search

Folder Search

hjcupupup

|
6 installs
| (0) | Free
允许在Cmd+P快速打开中搜索文件夹名称
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Fold-Search - VSCode 文件夹搜索扩展

这个 VSCode 扩展增强了标准的快速打开功能(Cmd+P / Ctrl+P),使您可以搜索和打开文件夹,而不仅仅是文件。

特性

  • 🔍 使用 Cmd+P(macOS)或 Ctrl+P(Windows/Linux)搜索工作区中的文件夹
  • 📁 在搜索结果中显示文件夹,并允许直接打开它们
  • 📄 保留原有的文件搜索功能
  • ⚙️ 提供配置选项来自定义搜索行为
  • ⚡ 高效的缓存系统,确保即使在大型项目中也能快速搜索
  • 🚀 预加载缓存机制,首次使用后响应速度极快
  • 📋 智能缓存管理,自动检测文件夹结构变化
  • 🎯 手动刷新缓存功能,完全控制索引更新

使用方法

  1. 安装扩展后,使用标准的快速打开快捷键:

    • macOS: Cmd+P
    • Windows/Linux: Ctrl+P
  2. 开始输入文件夹或文件的名称

    • 文件夹会显示为:📁 文件夹名称
    • 文件会显示为:📄 文件名称
  3. 在结果中选择您想要打开的文件夹或文件:

    • 选择文件夹将在资源管理器中显示该文件夹
    • 选择文件会正常打开文件
  4. 手动刷新缓存:

    • 使用命令面板(Ctrl+Shift+P / Cmd+Shift+P)
    • 搜索"刷新文件夹索引缓存"并执行

配置选项

在 VSCode 设置中,您可以自定义以下选项:

  • fold-search.enabled: 启用或禁用文件夹搜索功能(默认:启用)
  • fold-search.includeFilesInResults: 是否在搜索结果中包含文件(默认:包含)
  • fold-search.maxCacheItems: 缓存的最大项目数量,控制内存使用(默认:5000)
  • fold-search.cacheExpiryMinutes: 缓存过期时间,单位分钟(默认:10 分钟)

搜索功能

扩展按以下优先级对搜索结果进行排序:

  1. 文件夹优先于文件
  2. 精确匹配优先于部分匹配
  3. 前缀匹配优先于包含匹配
  4. 较短的名称优先于较长的名称

搜索支持路径匹配,您可以输入文件夹名称或路径的一部分来查找文件。

性能优化

智能缓存策略

  • 预加载:扩展激活时在后台预加载文件索引
  • 长期缓存:默认缓存有效期 10 分钟,避免频繁重新扫描
  • 增量更新:只在文件夹结构变化时才更新缓存
  • 防抖机制:避免频繁的文件系统变化导致过多更新

扫描优化

  • 自动跳过常见的无关目录(node_modules、.git、dist 等)
  • 限制缓存项目数量,避免内存过度使用
  • 非递归算法,避免深层嵌套导致的性能问题

用户体验

  • 首次使用可能需要短暂加载,之后响应极快
  • 实时状态显示,让您了解当前加载状态
  • 结果限制在 100 项以内,保证快速渲染

适用场景

当您的项目包含许多相似名称的文件或复杂的嵌套文件夹结构时,此扩展特别有用。它允许您直接跳转到需要的确切文件夹,而不必在资源管理器中手动导航。

问题反馈

如果您有任何问题或建议,请在 GitHub 仓库上提交 issue。

更新日志

0.0.1

  • 初始版本
  • 增加了对文件夹搜索的支持
  • 添加了配置选项
  • 实现了高效的缓存系统
  • 添加了预加载和增量更新功能
  • 提供了手动刷新缓存命令

Features

Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.

For example if there is an image subfolder under your extension project workspace:

![feature X](images/feature-x.png)

Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.

Requirements

If you have any requirements or dependencies, add a section describing those and how to install and configure them.

Extension Settings

Include if your extension adds any VS Code settings through the contributes.configuration extension point.

For example:

This extension contributes the following settings:

  • myExtension.enable: Enable/disable this extension.
  • myExtension.thing: Set to blah to do something.

Known Issues

Calling out known issues can help limit users opening duplicate issues against your extension.

Release Notes

Users appreciate release notes as you update your extension.

1.0.0

Initial release of ...

1.0.1

Fixed issue #.

1.1.0

Added features X, Y, and Z.


Following extension guidelines

Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.

  • Extension Guidelines

Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

  • Split the editor (Cmd+\ on macOS or Ctrl+\ on Windows and Linux).
  • Toggle preview (Shift+Cmd+V on macOS or Shift+Ctrl+V on Windows and Linux).
  • Press Ctrl+Space (Windows, Linux, macOS) to see a list of Markdown snippets.

For more information

  • Visual Studio Code's Markdown Support
  • Markdown Syntax Reference

Enjoy!

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