我设置了一个多根工作区,其中四个文件夹中有两个是外部文件夹,因此我无法向该文件夹添加特定设置。我想禁用对这些文件夹的搜索,最好是在工作区设置中。
我找不到合适的模式来完成这项工作:(
以下是我的工作区设置,我正在尝试过滤 out 文件夹中的文件:
"folders": [
{
"name": "Application"
"path": "./application"
},
{
"name": "Device"
"path": "./device"
},
{
"name": "Out"
"path": "./out"
}],
"settings": {
// Configure glob patterns for excluding files and folders in searches. Inherits all glob patterns from the files.exclude setting.
"search.exclude": {
"out": true,
"**/tests": true,
".tags": true
},
最佳答案
正如 https://stackoverflow.com/a/33418660/6225923 中提出的,您可以使用工作区设置并为要排除的文件夹添加模式,如下所示:
"search.excludeFolders": [
"folder1",
"folder2",
"folder3",
"path/to/other/folder4"
],
此外,确保搜索排除仍然处于事件状态是设置。
关于visual-studio-code - 如何排除多根工作区文件夹之一中的所有文件以在 Visual Studio 代码中进行搜索?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50970779/