vsCode--設置顯示文件和搜索過濾


文件位置:文件(File)-首選項(Preference)-設置(setting)

打開setting.json文件輸入一下內容即可

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

上面的字段將為 VS Code 設置搜索時排除的目錄,和在文件列表中隱藏的文件類型。由於 build, temp, library 都是編輯器運行時自動生成的路徑,而且會包含我們寫入的腳本內容,所以應該在搜索中排除。而 assets 目錄下的每個文件都會生成一個 .meta 文件,一般來說我們不需要關心他的內容,node_modules文件較大, 我一般也隱藏掉, 如果不需要的話, 可以不設置此項

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM