How to Hide node_modules Folder in VS Code?


If you’re working with Node.js, chances are you’ve encountered the node_modules folder. This folder is created when you install packages from NPM and can take up an incredible amount of space. To keep your workspace clean and tidy, you might want to learn how to hide the node_modules folder in Visual Studio Code. In this blog post, we’ll explain how to do it in three easy steps.

Step 1: Open Settings

The first step is to open the settings in Visual Studio Code. You can do this by clicking on the gear icon in the bottom-left corner of the sidebar.

Step 2: Find Files Exclude

Once you open the settings, you’ll need to find the Files: Exclude section. This section allows you to hide certain files and folders from the Explorer view.

Step 3: Add node_modules

The final step is to add the node_modules folder to the list of excluded files and folders. To do this, you’ll need to type in the name of the folder in the text field. Once you do that, the node_modules folder will no longer appear in the Explorer view.


That’s all you need to know about hiding the node_modules folder in Visual Studio Code. It’s a simple process that can help you keep your workspace uncluttered and organized. Give it a try and see how it works for you!

Happy Coding!


How to use code highlight in .inc files in VS code as PHP?

.inc is used in various languages. In my case, I use .inc extension in PHP files.

By Default, my vs code editor is not highligthing any code within .inc extension files.

To enable, the highlight option I have done the following steps.

Text Editor Settings

  1. Go to File > Preferences > Settings > Text Editor > Files > Add Item
  2. Add entry *.inc > php
  3. Save

My current VS Code version is 1.74.1