How to exclude files from Explorer in VSCode

Visual Studio Code displays the files of the currently open workspace or folder in an Explorer on the left. Sometimes, you may want VSCode to exclude certain files from the Explorer.

To do that:

  • Go to File → Preferences → Settings.
  • If you want to exclude for all projects, open the User Settings. If you want to exclude only for the current project, open the Workspace Settings.
  • Add a files.exclude entry like this:
"files.exclude" : {
    "Makefile": true,
    "*.html": true,
    "build/*": true
}

As shown above, filenames and globbing are allowed.

Tried with: Visual Studio Code 1.25.1 and Windows 10

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.