Repository navigation
Closed
Labels
feature-requestRequest for new features or functionalityfile-explorerExplorer widget issuesfile-globFile glob engineinsiders-releasedPatch has been released in VS Code Insiderson-testplan
Milestone
Description
The files exclude allows you to set true/false values, but it doesn't seem to take them completely into account.
For example, I would like to hide everything except for the scripts folder. You might then assume that this would do this:
{
"files.exclude":
{
"**/*": true,
"**/Scripts": false
}
}
It does not do that, it just hides everything. In order to achieve this, you must list every file and directory except for the Scripts directory, and who knows how many directories there are and if a new directory/file gets added you then must edit the list to exclude those.
In the end, their should be a way to hide everything except for xxx.
Reacted by York Yao, Alex Walter, iygnay, Jonas B. Rasmussen, emanuel.masciarelli.arkane, spyke, Wayne Yang, Joe Esteves, Duy Dao, viskin and 643 more
Reacted by Lam Nguyen, Dima Goncharenko, Riley Shaw, Carmenpfeil, Boris, Maxim Zaytsev, hrazmsft, Manoj Baishya, K Adam White, Jon Sadka and 24 more
Reacted by Yaroslav Zhmayev, K Adam White, Dariusz Filipiak, Alexander, Jakub Čábera, Tony Xiao, Jude Frederic, Sumit, Charles Bodman, mdornseif and 66 more
Reacted by Dima Goncharenko, Riley Shaw, Carmenpfeil, Boris, Maxim Zaytsev, hrazmsft, Manoj Baishya, K Adam White, Jon Sadka, bl-ue and 24 more
Reacted by Thiago M., Wolfgang Steiner, hrazmsft, kanlukasz, Jon Sadka, Fahri, bl-ue, Markus Zimmermann, nom3ad, josh and 18 more
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityfile-explorerExplorer widget issuesfile-globFile glob engineinsiders-releasedPatch has been released in VS Code Insiderson-testplan
Activity
plantain-00 commentedon Dec 2, 2015
The comments above the
files.excludesaysConfigure glob patterns for excluding files and folders.. theglobcan use!to exclude files and folders(which is not implemented by vscode now). for example:dhirschfeld commentedon Dec 8, 2015
Can an option be added to exclude everything in the
.gitignore?bpasero commentedon Dec 8, 2015
Using negated glob patterns with "!" is currently not supported.
TheColorRed commentedon Dec 8, 2015
.gitignorewill only hide the items from a commit, not hide them within the Editorhellogavin commentedon Dec 24, 2015
It's grate!!!
xfoxfu commentedon Jan 30, 2016
👍 I also want negated glob patterns since I use
Jakefile.jsto describe Jake tasks for my TypeScript project.JAForbes commentedon Feb 7, 2016
👍 I need negated glob files as we store our many services in
node_modulesunder the same repo. We hidenode_modulesbecause it slows down the editor, and clutters the workspace. But we have to use directory symlinks so we can edit the specific services in another folder.If we could exclude these folders from being ignored, we could remove the symlinks and significantly reduce the complexity of our project. (Another issue is, debugging node in a symlinked folder doesn't work in vscode, this would be solved by this feature also.)
AdamAndersonFalafelSoftware commentedon Mar 17, 2016
Yes, we need negated glob exclusions. In Node, the built-in place to put application-wide modules is in a node_modules folder. You would want to be able to exclude node_modules except for your project's modules under e.g. node_modules/_local so that you can easily navigate to your own modules without also including all the imported ones.
Edit: this glob already works for the scenario above:
{ "search.exclude": { "**/node_modules": false, "**/node_modules/!(.local)": true, "**/bower_components": true } }222 remaining items
chore: prevent Perfetto submodule appearing in vscode search results
chore: prevent ONNX submodule appearing in vscode search results
Vindicatory commentedon Jun 4, 2026
+1
hoping my grandchildren will see it
biscimus commentedon Aug 5, 2026
+1
andresmedina-ui commentedon Sep 16, 2026
+1
files: support `!` exclude exceptions in files.exclude and search.exc…