You can configure patterns to hide files and folders from the explorer and searches.
- Open VS User Settings (Main menu:
File > Preferences > Settings
). This will open the setting screen.
- Search for
files:exclude
in the search at the top.
- Configure the User Setting with new glob patterns as needed. In this case add this pattern
node_modules/
then click OK. The pattern syntax is powerful. You can find pattern matching details under the Search Across Files topic.
When you are done it should look something like this:
![enter image description here](https://i.stack.imgur.com/xHli0.png)
If you want to directly edit the settings file:
For example to hide a top level node_modules folder in your workspace:
"files.exclude": {
"node_modules/": true
}
To hide all files that start with ._
such as ._.DS_Store
files found on OSX:
"files.exclude": {
"**/._*": true
}
You also have the ability to change Workspace Settings (Main menu: File > Preferences > Workspace Settings
). Workspace settings will create a .vscode/settings.json
file in your current workspace and will only be applied to that workspace. User Settings will be applied globally to any instance of VS Code you open, but they won't override Workspace Settings if present. Read more on customizing User and Workspace Settings.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…