Quick search in Visual Studio Code

I wanted 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 function is when searching for text in large project files.

PhpStorm is really good for this, and for me it is an important feature. I can understand that PhpStorm is good at this because it pre-indexes all the files in the project.

Is there a way to speed up the search for VS code?

0
source share
1 answer

It can be as simple as telling VS Code not to index / search for specific folders. Are there any /vendor or /dist folders that you do not want to search? Try the following:

  • Do one of your slow searches.
  • Look at the files that are returned
  • See if there are any files that will be returned to a folder that you don’t need

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 appear in the search, add them too.

The fewer files you need to search, the faster it will be

0
source

All Articles