Hide folders in Visual Studio Code Explorer

Problem:

I have a lot more files and folders on disk than I want to show in Visual Studio Code.

image

Solution:

Use the files.exclude setting to hide folders and files.

Explanation:

  1. Press F1
  2. Type settings
  3. Select Open Workspace Settings
    image
  4. On the right side type files.exclude and press Enter
    image
  5. Add additional entries and save the file
    image
  6. Enjoy your new clean Explorer
    image

Comments (15) -

  • Mike Ratcliffe

    10/12/2017 9:48:33 AM | Reply

    You should mention that after changing the workspace setting you need to restart VSCode.

    • Donovan

      10/13/2017 12:18:45 PM | Reply

      Interesting because I have never had to restart for those changes to take effect.

    • Tim

      7/26/2018 9:18:08 PM | Reply

      I just did it and didn't have to restart vscode. In fact, as soon as I saved the settings.json file the node_modules folder disappeared.

  • Anonymous

    10/22/2017 3:34:35 AM | Reply

    Beautiful, thanks!

  • Supan Adit Pratama

    10/29/2017 11:57:28 AM | Reply

    Thanks

  • chris bandit

    12/4/2017 4:49:11 PM | Reply

    This has improved the quality of my life significantly. You're a good man Smile

  • Sathiyaseelan

    9/11/2018 7:39:35 AM | Reply

    Thanks

  • Muhanad YOUNIS

    10/16/2018 6:38:28 AM | Reply

    greate thanks.

  • Enes Bala

    2/4/2019 11:26:14 PM | Reply

    Just what I needed! Thanks a lot!

  • Dylan Wang

    2/22/2019 11:58:25 AM | Reply

    This saves lives! Thank you

  • Sumanth

    4/3/2019 3:05:42 AM | Reply

    Thank you Donovan

  • AlaaEddin

    7/1/2019 10:05:02 PM | Reply

    Nice, but is there any shortcut to show/hide these files for quick editing any of them?

  • Zohaib Zameer

    8/19/2019 7:13:37 AM | Reply

    Keep up the good work!

  • Mojtabaa

    1/4/2020 12:02:06 PM | Reply

    Thanks A Lot !

  • ivar

    10/6/2020 5:26:40 AM | Reply

    Great.. Thanks for the tip.. !!

Add comment

Loading