如何在vscode中查看项目文件列表 [英] How to see list of project files in vscode
问题描述
我有一个 vscode 项目,我知道里面有太多文件.当我进行搜索时,系统正在努力搜索许多文件,我偶尔会在状态栏中收到小警告,建议将文件添加到 files.exclude.问题是,我不知道额外的文件来自哪里.我的猜测是我在某处忽略了一些临时文件或数据目录,但在文件夹视图中找不到它们.(我确定它们在那里,但手动搜索我没有看到它们)
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)
所以我的问题是,vscode 是否有办法查看列表或要求提供被视为项目一部分的所有文件的列表,以便我可以追踪我不需要的文件在哪里?
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?
推荐答案
会减慢搜索速度的事情是:
Things that would slow your search down are:
- 不必要地跟踪包含大量文件的文件夹(
dist
、vendor
等...) - 巨大的文件
对于#1,您可以进行通用搜索,看看搜索结果中是否出现了奇怪的文件夹.将它们添加到设置中的 files.exclude
中,然后重新搜索.
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.
对于#2,打开嵌入式终端并运行命令find ./-size +5000 -print
.这将找到所有大于 5Mb 的文件.对于不需要搜索的任何内容,将文件(或整个文件夹)添加到阻止列表中.
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.
另见:https://stackoverflow.com/a/40613250/1169948.
这篇关于如何在vscode中查看项目文件列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!