Skip to content
| Marketplace
Sign in
Visual Studio Code>Extension Packs>FileFilterNew to Visual Studio Code? Get it now.
FileFilter

FileFilter

Owen van Dijk

|
9 installs
| (0) | Free
Persistent file filtering in the Explorer sidebar with real-time search for extensions, filenames, and directories
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

FileFilter

A Visual Studio Code extension that provides persistent file filtering functionality directly in the Explorer sidebar. Filter files in real-time as you type, with support for file extensions, filenames, and directory names. Compatible with VS Code and its forks like Cursor and Windsurf.

Features

  • Persistent Filter Input: Always-visible filter input at the bottom of the Explorer sidebar
  • Real-time Filtering: Filter files as you type with 300ms debounce
  • Multiple Filter Types: Support for glob patterns, filename matching, and directory filtering
  • Auto-expand Directories: Automatically expands folders when filtering by directory name
  • iOS-style Clear Button: Round X button that appears when typing, like iOS search fields
  • Smart Filtering: Hides non-matching files and empty directories from the Explorer

Usage

Filtering Files

The filter input is always visible at the bottom of the Explorer sidebar. Simply start typing to filter files:

File Extensions:

  • *.ts - Show only TypeScript files
  • *.json - Show only JSON files
  • *.{js,ts} - Show JavaScript and TypeScript files

Filename Matching:

  • README - Show files containing "README" (like README.md)
  • package - Show files containing "package" (like package.json, package-lock.json)
  • config - Show files containing "config"

Directory Filtering:

  • src - Show all files in the src directory (auto-expands the folder)
  • test - Show all files in directories containing "test"

Clearing Filters

  • Click the X button in the filter input (appears when typing)
  • Clear the text input manually
  • Use the "File Filter: Clear" command from Command Palette

Commands

Command Description
filefilter.setFilter File Filter: Set Pattern
filefilter.clearFilter File Filter: Clear

Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "FileFilter"
  4. Click Install

Manual Installation

  1. Download the .vsix file from the releases page
  2. Open VS Code
  3. Go to Extensions (Ctrl+Shift+X)
  4. Click the "..." menu and select "Install from VSIX..."
  5. Select the downloaded .vsix file

Development Installation

# Clone the repository
git clone https://github.com/ohwhen/code-plugin-file-filter.git
cd code-plugin-file-filter

# Install dependencies
npm install

# Compile the extension
npm run compile

# Open in VS Code for development
code .

Press F5 to run the extension in a new VS Code window for testing.

Building and Publishing

Build the Extension

npm install
npm run compile

Package for Distribution

# Install vsce globally
npm install -g vsce

# Package the extension
vsce package

This creates a .vsix file that can be installed manually or published to the marketplace.

Publish to Marketplace

# Login to Visual Studio Marketplace
vsce login your-publisher-name

# Publish the extension
vsce publish

Requirements

  • VS Code version 1.74.0 or higher
  • Node.js 16.x or higher (for development)

Compatibility

This extension is compatible with:

  • Visual Studio Code
  • Cursor
  • Windsurf
  • Other VS Code-based editors

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Changelog

0.1.0

  • Initial release
  • Persistent filter input in Explorer sidebar
  • Real-time filtering with 300ms debounce
  • Support for file extensions (*.ts, *.json)
  • Support for filename matching (README, package)
  • Support for directory filtering with auto-expand
  • iOS-style clear button
  • Smart filtering that hides empty directories
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft