在 Visual Studio Code 中快速搜索 [英] Fast search in Visual Studio Code

查看:44
本文介绍了在 Visual Studio Code 中快速搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直想从 PhpStorm 转移到 VS Code,但我不喜欢 VS Code 的一件事是它的内置搜索功能在大型项目的文件中查找文本的速度太慢.

I've been wanting to move from PhpStorm to VS code, but one of the things I don't like about VS Code is how slow its built-in Search feature is at finding text within the files of a large project.

PhpStorm 对此非常有用,对我来说,它是一个必不可少的功能.我可以理解 PhpStorm 擅长这一点,因为它预先索引了项目中的所有文件.

PhpStorm is really good for this and, for me, is an essential feature. I can understand that PhpStorm is good at this because it is indexing all the files in the project beforehand.

有什么办法可以让 VS Code 搜索更快?

Is there any way I can make VS Code search faster?

推荐答案

这可能就像告诉 VS Code 不要索引/搜索某些文件夹一样简单.是否有您不想搜索的 /vendor/dist 文件夹?试试这个:

It may be as simple as telling VS Code not to index / search certain folders. Are there /vendor or /dist folders that you don't want to search through? Try this:

  • 进行慢速搜索之一
  • 查看返回的文件
  • 查看您不关心的文件夹中是否有文件返回

对于这些文件夹中的每一个,将它们添加到设置文件的 files.exclude 部分:

For each of these folders, add them to the files.exclude section of your settings file:

"files.exclude": {
  "**/dist*": true,
  "**/node_modules*": true
},

如果搜索中显示了任何非常大的文件,也请添加这些文件.

If there are any really large files that show up in the search, add those too.

搜索需要处理的文件越少,速度就越快

The fewer files the search needs to deal with, the faster it will go

这篇关于在 Visual Studio Code 中快速搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆