hawtim.github.io icon indicating copy to clipboard operation
hawtim.github.io copied to clipboard

vscode 忽略指定文件夹避免 cpu 暴涨

Open hawtim opened this issue 4 years ago • 1 comments

背景

最近折腾 ohmyzsh 需要调整 ~ 目录下的配置,经常一个 code . 打开 vscode 直接打开整个目录,发现 cpu 使用率立马上升到 96% 岿然不动。OK 那我就忽略掉一些文件夹吧~

创建 workspace settings

参考以下配置,一些比较通用的我取出来了,一些自定义的需要自己加上。

// Place your settings in this file to overwrite default and user settings.
{
  "files.exclude": {
    ".nvm": true,
    ".npm": true,
    ".node-gyp": true,
    "flutter": true,
    "Applications": true,
    "Pictures": true,
    "Music": true,
    "Movies": true,
    "Public": true,
    "Downloads": true,
    "Documents": true,
    "Library": true,
  },
  "search.exclude": {
    ".nvm": true,
    ".npm": true,
    ".node-gyp": true,
    "flutter": true,
    "Applications": true,
    "Pictures": true,
    "Music": true,
    "Movies": true,
    "Public": true,
    "Downloads": true,
    "Documents": true,
    "Library": true,
  }
}

hawtim avatar Feb 10 '21 03:02 hawtim

参考链接

https://code.visualstudio.com/docs/supporting/faq#_resolving-shell-environment-is-slow-error-warning https://stackoverflow.com/questions/33258543/how-can-i-exclude-a-directory-from-visual-studio-code-explore-tab

hawtim avatar Feb 10 '21 03:02 hawtim