ubuntu下是这样,windows下还试。

vscode工程目录文件及文件夹摘选
在工程工作区下新建一个.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 表示不排除。用这种 方法即可将不需要的文件,或者文件夹排除掉 。