0

I have a vscode project that I know has too many files in it. When I do searches the system is grinding away to search through many many files and I get the little warning in the status bar once in a while suggesting to add files to files.exclude. The problem is, I don't know where the extra files are coming from. My guess is that somewhere I have overlooked some temp files or data directories, but I can't find them in the folder view. (I am sure they are there, but manually searching I don't see them)

So my question is, does vscode have a way to see a list or ask for a list of all files that are considered part of the project so I can track down where the ones I don't need are?

Allen
  • 3,134
  • 5
  • 29
  • 49

1 Answers1

2

Things that would slow your search down are:

  1. Unnecessarily tracked folders with lots of files in them (dist, vendor, etc...)
  2. Huge files

For #1, you could do a generic search and see if weird folders are showing up in the search results. Add them to files.exclude in settings and then re-search.

For #2, open up the embedded terminal and run the command find ./ -size +5000 -print. This will find all files > 5Mb. For anything that doesn't need to be searched, add the file (or whole folder) to the blocklist.

See also: https://stackoverflow.com/a/40613250/1169948.

Community
  • 1
  • 1
Dan Caddigan
  • 1,578
  • 14
  • 25
  • Another duplicate https://stackoverflow.com/questions/33258543/how-can-i-exclude-a-directory-from-visual-studio-code-explore-tab – MutantMahesh Aug 07 '17 at 00:45