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 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.
Is there any way I can make VS Code search faster?
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:
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.
Update Oct 2021
You should now use search.exclude
instead of files.exclude
, as files.exclude
will remove the files from search, but will also remove the files from your file tree in the leftnav. search.exclude
only filters them out of search.
"search.exclude": {
"**/dist*": true,
"**/node_modules*": true
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With