Hide files matching .gitignore patterns from VS Code Explorer for a cleaner workspace
CleanView automatically hides files and folders that match patterns in your .gitignore files, giving you a cleaner, more focused view of your project in the VS Code Explorer.
- 🔍 Smart Gitignore Parsing: Uses spec-compliant gitignore pattern matching
- 👁️ Toggle Visibility: Easily show/hide gitignored files with commands or status bar
- 📁 Nested Support: Handles nested
.gitignorefiles throughout your project - ⚡ Auto-Updates: Automatically refreshes when
.gitignorefiles change - 🎛️ Configurable: Customize behavior with extension settings
- 📊 Status Indicator: Visual status bar showing active state and pattern count
- Install the extension
- Open a project with a
.gitignorefile - Use
Ctrl+Shift+P→ "CleanView: Toggle Hide Gitignored Files" - Or click the eye icon in the status bar
| Command | Description |
|---|---|
CleanView: Toggle Hide Gitignored Files |
Show/hide gitignored files |
CleanView: Refresh Gitignore Patterns |
Manually refresh patterns |
CleanView: Disable CleanView |
Completely disable hiding |
| Setting | Description | Default |
|---|---|---|
cleanview.autoHide |
Automatically hide files on activation | true |
cleanview.includeNestedGitignore |
Include nested .gitignore files | true |
cleanview.showStatusBar |
Show status bar indicator | true |
cleanview.customPatterns |
Additional custom ignore patterns | [] |
The status bar indicator shows:
👁️ CleanView- Inactive (files visible)👁️🗨️ CleanView (12)- Active (files hidden, 12 patterns applied)
Click the indicator to toggle visibility.
CleanView reads your .gitignore files and converts the patterns into VS Code's files.exclude setting temporarily. When you disable CleanView, it restores your original exclude settings.
- Standard gitignore patterns (
*.log,node_modules/,/build) - Nested
.gitignorefiles in subdirectories - Custom patterns from extension settings
- Negation patterns (
!important.log) are handled correctly
# .gitignore
node_modules/
*.log
.DS_Store
/build
CleanView will hide:
- All
node_modulesfolders - Any
.logfiles .DS_Storefiles- The
buildfolder in the root
Add custom patterns in VS Code settings:
{
"cleanview.customPatterns": [
"*.tmp",
"cache/",
".vscode/settings.json"
]
}- VS Code 1.74.0 or higher
- A workspace with
.gitignorefiles (recommended)
- Large projects may take a moment to process complex gitignore patterns
- Pattern changes require manual refresh in some edge cases
- Initial release
- Core gitignore parsing and file hiding
- Status bar integration
- Configuration options
- File system watchers
Found a bug or have a suggestion? Please open an issue.
MIT License - see LICENSE file for details.
Enjoy a cleaner workspace with CleanView! ✨