How to hide files with specific extension in VSCode tree view
They have added this feature now. Go to File->Preferences->Workspace Settings. That opens or creates the .vscode folder, and underneath it the settings.json file.
Here is a full settings.json file that shows how to exclude the .git folder, the dist folder and the node_modules folder.
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/.git": true,
"dist": true,
"node_modules": true
}
}
F1 > Preferences:Open Workspace Settings > [search settings] exclude > Files:Exclude > Add Pattern
In other words, press F1 to open the thingy search thing, to find Preferences:Open Workspace Settings
, then in the next search box, search for 'exclude', and add the pattern to exclude in the Files:Exclude
section.
For example, to exclude all hidden backup files in Linux -- i.e. files with a tilde '~' on the end, add the pattern **/*~
.
You might want to exclude the same pattern from the Search:Exclude
and Files:Watcher Exclude
sections.
Not at this time, but you can vote for the feature at the Visual Studio Code User Voice.