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 (11) -

  • 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

Add comment

Loading