Folder Selector VS Code Extension
This extension adds a powerful command that lets you quickly find and navigate to any folder in your workspace. As you type, it shows matching folders in real-time, making it easy to find deeply nested directories.
Features
- Lightning fast - Intelligent caching system indexes folders once and keeps them updated
- Live search - See matching folders as you type
- Fuzzy matching - Find folders by name or path fragment (e.g.
test-mcap
, my-folder-1
, or backend/api
)
- Auto-updating cache - Automatically detects folder changes and updates the index
- Persistent cache - Survives VS Code restarts and workspace changes
- Instant navigation - Selected folder is immediately revealed in the Explorer view
Development
- Install dependencies:
npm install
If you are working in an offline environment you can install dependencies on a machine with internet access and copy the resulting node_modules
directory into this project.
- Compile the extension:
npm run compile
- Press
F5
in VS Code (or Run → Start Debugging
) to launch a new Extension Development Host for live testing.
Testing the Extension
Development Mode Testing
Start the Extension Development Host:
- Press
F5
in VS Code/Cursor (or go to Run → Start Debugging
)
- A new window will open with the extension loaded (look for the colored bar at the bottom)
Open a test workspace:
- In the new Extension Development Host window, open a folder:
File → Open Folder...
- For example, open the
testing-folders
directory in this project
Run the extension command:
- Press
Cmd+Shift+P
(Mac) or Ctrl+Shift+P
(Windows/Linux)
- Type:
Folder Selector: Select Folder by Name
- Start typing a folder name to see matching results
- Select a folder from the list to reveal it in the Explorer
Live development:
- Optionally run
npm run watch
to auto-compile on file changes
- After making code changes, reload the extension:
Cmd+Shift+F5
(or Ctrl+Shift+F5
)
Debugging
- Set breakpoints in
src/extension.ts
by clicking left of line numbers
- Use the Debug Console in the original window to see console output
- The extension will pause at breakpoints when you run the command
Packaging & Local Installation (VS Code / Cursor IDE)
- Ensure the project is compiled (
npm run compile
).
- Package the extension into a VSIX file using
@vscode/vsce
:
npx @vscode/vsce package
This command produces a file like folder-selector-0.0.1.vsix
in the project root.
- Open your VS Code or Cursor IDE instance.
- From the command palette (
Ctrl+Shift+P
/ Cmd+Shift+P
), run Extensions: Install from VSIX....
- Select the generated
.vsix
file and follow the prompts to install it.
- Reload the editor when prompted.
Using the Extension
Quick Folder Selection
- Open the command palette (
Cmd+Shift+P
/ Ctrl+Shift+P
) and run Folder Selector: Select Folder by Name.
- A quick pick menu appears showing available folders.
- Start typing to filter folders in real-time (e.g.,
test-mcap
, my-folder-1
).
- Use arrow keys to navigate and press
Enter
to select a folder.
- The selected folder is automatically revealed in the Explorer view.
Cache Management
- First run: The extension will scan and index all folders (one-time operation)
- Subsequent runs: Instant results from the cached index
- Auto-updates: The cache automatically updates when folders are added/removed
- Manual refresh: Use Folder Selector: Clear Cache to force a complete rescan
Performance: After the initial scan, folder selection is nearly instantaneous, even in large projects with thousands of folders.
Configuration
The extension can be customized through VS Code settings. Open your settings (Cmd+,
/ Ctrl+,
) and search for "Folder Selector" or edit settings.json
:
folderSelector.ignoredFolders
List of folder names to ignore during scanning. By default includes common build and dependency directories.
Default:
{
"folderSelector.ignoredFolders": [
"node_modules",
".git",
".vscode",
"dist",
"build",
"out",
".next",
".nuxt",
"target",
"bin",
"obj",
"vendor",
"__pycache__",
".pytest_cache",
"venv",
".venv",
".cursor",
".github",
".husky"
]
}
Example - Add custom folders to ignore:
{
"folderSelector.ignoredFolders": ["node_modules", ".git", "coverage", "logs", "temp", ".cache"]
}
folderSelector.maxDepth
Maximum depth to search for folders. Lower values improve performance in large projects.
- Default:
5
- Range:
1
to 20
Example:
{
"folderSelector.maxDepth": 8
}
folderSelector.maxFolders
Maximum number of folders to scan. Prevents memory issues in very large workspaces.
- Default:
10000
- Range:
100
to 50000
Example:
{
"folderSelector.maxFolders": 5000
}
folderSelector.ignoreDotFolders
Automatically ignore all folders that start with a dot (hidden folders). This is useful for skipping configuration folders like .git
, .vscode
, .config
, etc.
- Default:
true
- Type:
boolean
Example:
{
"folderSelector.ignoreDotFolders": false
}
Note: When ignoreDotFolders
is true
, folders starting with a dot will be ignored even if they're not in the ignoredFolders
list. Set to false
if you want to include dot folders in your search results.
Troubleshooting
No folders found
Confirm that the folder name is spelled correctly and exists somewhere inside the currently opened workspace. Check that it's not excluded by:
folderSelector.ignoredFolders
list
folderSelector.ignoreDotFolders
setting (if the folder starts with a dot)
- Beyond the
folderSelector.maxDepth
limit
Command missing
Make sure the extension is activated by executing the command from the command palette. If it still does not appear, reload the editor and check that the extension is enabled in the Extensions view.
For large projects, try these settings:
- Reduce
folderSelector.maxDepth
(try 3
or 4
)
- Add more folders to
folderSelector.ignoredFolders
(e.g., coverage
, logs
, temp
)
- Reduce
folderSelector.maxFolders
if you have a massive workspace
Folders are missing from results
- Check if they're in the
folderSelector.ignoredFolders
list
- Check if
folderSelector.ignoreDotFolders
is hiding dot folders
- Increase
folderSelector.maxDepth
if they're deeply nested
- Increase
folderSelector.maxFolders
if the limit was reached
- Clear cache if folders were recently added:
Folder Selector: Clear Cache
Cache issues
- Stale results: Use
Folder Selector: Clear Cache
to force a rescan
- Cache not updating: The extension automatically watches for changes, but you can manually clear cache if needed
- Performance problems: Try reducing
folderSelector.maxDepth
or adding more folders to folderSelector.ignoredFolders
License
This project is provided as-is under the MIT License.