[英]In IntellIJ IDEA how can I exclude a few files from find in path?
When I do a find all (Ctrl-Shift-F) it takes very long, because I have some autogenerated js files in my project that are quite large.当我执行 find all (Ctrl-Shift-F) 时需要很长时间,因为我的项目中有一些自动生成的 js 文件非常大。
How can I exclude those files from my searches?如何从搜索中排除这些文件?
Obviously I don't want to exclude all js files.显然我不想排除所有的 js 文件。
IntelliJ let's you pick one or more file types to search, but is there any way to search everything except 2 or 3 known files. IntelliJ 让您选择一种或多种文件类型进行搜索,但有没有办法搜索除2 或 3 个已知文件之外的所有内容。
I tried marking them as ignored, but they still show up in searches.我尝试将它们标记为忽略,但它们仍然出现在搜索中。
The help is here https://www.jetbrains.com/help/idea/2018.3/finding-and-replacing-text-in-project.html#limit_search帮助在这里https://www.jetbrains.com/help/idea/2018.3/finding-and-replacing-text-in-project.html#limit_search
It recommends restricting to a directory, or a module, but there are quite a few directories and it's all in the same module, so that does not work for me.它建议限制为一个目录或一个模块,但是有很多目录并且它们都在同一个模块中,所以这对我不起作用。
In the File Mask you can use ! 在文件掩码中,您可以使用! oparand to exclude the files for example for not in js file then the file mask would be !*.js.
oparand排除文件,例如不在js文件中,则文件掩码为!*。js。 You can also combine this with && and ||
您也可以将其与&&和||结合使用 operation to exclude or select the file types you are interested into.
用于排除或选择您感兴趣的文件类型的操作。
!*.json, !*.txt,!*.js,!*Test*.java,*.java
In IntelliJ 2021, you can include specific file type by .ext1 separated with commas and to exclude !在 IntelliJ 2021 中,您可以通过以逗号分隔的.ext1包含特定文件类型,并排除 ! .ext2
.ext2
Refer image, I need only .java file and not !参考图片,我只需要.java 文件而不是 ! .js you can also exclude !
.js 你也可以排除! Test .java as well.
也测试.java。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.