简体   繁体   English

在 IntellIJ IDEA 中,如何从路径中的查找中排除一些文件?

[英]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.

相关问题 使用Intellij Idea查找使用情况时排除文件 - exclude files when Find Usage with Intellij Idea 如何在 IntelliJ 的路径搜索中查找出现此路径的任何地方排除 node_modules - How can I exclude node_modules wherever this path occurs in find in path searches in IntelliJ 使用IntelliJ IDEA,如何在不打开IDE的情况下从项目中排除目录? - With IntelliJ IDEA, how can I exclude a directory from a project without opening the IDE? Intellij Idea无法找到其他来源的课程文件 - Intellij Idea can't find class files from other source 如何使用Intellij IDEA创建Jar文件(分离的程序包)? - How Can I Create Jar Files (seperated packages) with Intellij IDEA? 如何配置IntelliJ IDEA以允许Java文件中的shebang - How can I configure IntelliJ IDEA to allow a shebang in Java files Intellij IDEA 9:如何禁用 HTML 文件中的错误突出显示? - Intellij IDEA 9: How can I disable the highlighting of errors in HTML files? 如何在 IntelliJ IDEA 中找到特定文件? - How can I find particular file in IntelliJ IDEA? 如何从用于 IntelliJ IDEA 的 SonarLint 中的即时分析中排除 JS 文件? - How to exclude JS files from on-the-fly analysis in SonarLint for IntelliJ IDEA? Intellij IDea,在路径中找不到在.iml中的内容 - Intellij IDea, Find in Path can't find content in .iml
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM