vscode(setting.json) --- 设置文件显示和搜索过滤

ctrl + shift + p 打开 setting.json 

{
    "search.exclude": {        
        "**/node_modules": true,
        "**/bower_components": true,
        "dist/": true,
        "build/": true,
        "temp/": true,
        "library/": true,
        "**/*.anim": true
    },
    "files.exclude": {
        "**/.git": true,
        "**/.DS_Store": true,
        "**/*.meta": true,
        "library/": true,
        "local/": true,
        "temp/": true    
    }
}

上面的字段设置 VS Code 搜索时排除的目录,和在文件列表中隐藏的文件类型

 

**/build:表示所有 build 文件夹

*/build:表示指定 build 文件夹

[a-c]* 或者 [abc]* :表示字母a b c开头的文件或文件夹,[] 内表示的是一个字符

[!a-c]* 或者 [!abc]* :表示字母除了a b c开头的文件或文件夹

 

posted @ 2024-03-21 17:42  流水灯  阅读(435)  评论(0编辑  收藏  举报