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 表示不排除。用這種
方法即可將不需要的文件,或者文件夾排除掉








免責聲明!

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



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