Hide or Exclude Folders and Files From Search in Visual Studio Code

I love Visual Studio Code. I never thought I’d be saying that my favourite application was developed by Microsoft! One of it’s best features is the ability to customise almost anything using user settings.

Here is a a snippet that hides folders or excludes them from search. Handy for removing those core files that shouldn’t be edited anyway. It also helps with performance. These are mine for WordPress. Just add them to preferences > settings.

"files.exclude": {
    "*/**/node_modules/": true,
    "wp-includes/": true,
    "wp-admin/": true,
    //"wp-*.*": true,
    "wp-config.*": false,
    "xmlrpc.php": true,
    ".vscode/": true,
    "*/**/cache/": true,
    "*/**/uploads/": true,
    "*/**/infinitewp/": true,
    "*/**/.github/": true,
    //"*/**/build/": true
},
"search.exclude": {
    "build/": true,
},

More tip and tricks can be found here.

Posted on 14th February 2017

Related articles

Notes to your inbox

Be notified when I post something new. Occasional, short emails. Nothing fancy, just links to new articles and content.

I respect your inbox. No spam. Unsubscribe with just a click.


What I'm doing
My now page shows what I'm focusing my efforts on.

Send me an email
dave@daveredfern.com

Follow me online
Twitter
LinkedIn
Github

Photography
Gallery
Instagram