在工程工作區下新建一個.vscode 文件夾中並新建一個名為“settings.json”的文件,然后在 settings.json 中輸入如下內容:
{
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
}
}
其中"search.exclude"里面是需要在搜索結果中排除的文件或者文件夾,
"files.exclude"是左側工程目錄中需要排除的文件或者文件夾。
我們需要將 arch/avr32 文件夾下的所有文件從搜索結果和左側的工程目錄中都排除掉,
因此在"search.exclude"和"files.exclude"中輸入如圖 31.2.8 所示內容:
{
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"arch/avr32": true,
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"arch/avr32": true,
}
}
只是在"search.exclude"和"files.exclude"中加入了: arch/avr32": true,冒號前面的是要排
除的文件或者文件夾,冒號后面為是否將文件排除, true 表示排除, false 表示不排除。用這種
方法即可將不需要的文件,或者文件夾排除掉 。