Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide files with specific extension in VSCode tree view

I use VSCode with Unity3D and I wonder is there any way to hide/ignore/filter certain types of files, for example *.meta files in VSCode's tree view? I cant find any suitable option in settings.

like image 733
Utamaru Avatar asked Apr 30 '15 10:04

Utamaru


People also ask

How do I unhide extensions in VS Code?

Bring up the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of VS Code or the View: Extensions command (Ctrl+Shift+X).


3 Answers

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
    }
}
like image 90
TwitchBronBron Avatar answered Oct 05 '22 17:10

TwitchBronBron


Not at this time, but you can vote for the feature at the Visual Studio Code User Voice.

like image 41
Alex Dima Avatar answered Oct 05 '22 16:10

Alex Dima


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.

like image 29
markling Avatar answered Oct 05 '22 18:10

markling