提升vscode的搜索速度 | 您所在的位置:网站首页 › mac打开文件夹特别卡怎么回事 › 提升vscode的搜索速度 |
在全局搜索速度上vscode比pycharm要慢不少,尤其是对于我们这种近二十年历史的项目代码来说特别明显,所以这里记录一下我是如何加快vscode的搜索速度的。 官方的搜索建议https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options **匹配任意级别的目录 workspace忽略file:exclude和search:exclude能否针对workspace设置呢? 可以,如果这些是您要在特定工作空间中忽略的文件夹,则可以转到: AppMenu > Preferences > Workspace Settings 否则,如果要在所有工作空间中忽略这些文件夹,请转到: AppMenu > Preferences > User Settings 修改workspace的设置后在xxx.code-workspace中就会添加一个节点settings写入设置项 手动修改code-workspace的设置后,无需重启vscode就能生效。 设置文件列表和搜索忽略项打开settings.json,搜索exclude,分为用户、工作区、文件夹 files.exclude //不在资源管理器(也就文件目录树)中显示的文件 search.exclude //只会在搜索时排除 你在设置中修改设置后,xxx.code-workspace中就会添加一个节点settings写入设置项,示例: "settings": { "search.exclude": { ".svn": true, ".vscode": true, "**/.svn": true, }, "python.defaultInterpreterPath": "C:\\Python27\\python.exe", "files.autoGuessEncoding": true, "files.encoding": "UTF-8", "files.exclude": { "wallpaper": true } } watcher Exclude添加一些忽略目录,这样能减少CPU的消耗。 FAQ在workspace中添加了这样的配置,这样当全文搜索时,也会搜索不到这些目录下的文件 "settings": { "search.exclude": { ".svn": true, "**/cdata": true, "**/data": true, } }那有没有一种设置方式可以在文件列表中找到,但在全文搜索时排除? 在files.exclude中不出现,只出现在search.exclude中。 |
CopyRight 2018-2019 实验室设备网 版权所有 |