Danny Santos
Danny Santos

Reputation: 1160

Only open files of a certain type in Visual Studio Code

Using Visual Studio Code, is it possible to open a project directory, but only have it load certain types of files? Say, for example, you wanted to open up a directory that consisted of folders containing JavaScript files and images, but you only wanted the JavaScript files loaded in Visual Studio Code, is that possible?

Upvotes: 1

Views: 122

Answers (2)

Danny Santos
Danny Santos

Reputation: 1160

Go to Settings > Text Editor > Files > Exclude

And then add a pattern for excluding the type of files you don't want to see. For the example of images you might add a couple like this:

**/*.png
**/*.jpg

This is just a more specific version of the answer from @Angelica - all credit to her!

Upvotes: 0

Angelica
Angelica

Reputation: 46

The files.exclude setting within the Settings editor can allow you to configure glob patterns to exclude files and folders.

Source: https://code.visualstudio.com/docs/getstarted/settings

Upvotes: 3

Related Questions