my project has file with text "CDSettlementPrintingEnquiryComponent", I want to search which files contain this text in IntelliJ 2020.3, but fail, how to do this in Intellij Community 2020.3?
I try Find in Files>Directory tab also, all my files in under CFMS directlry, but again, IntelliJ still said nothing found...why?
Also, I cannot find the "Find in Path" menu mentioned in
Find the search string in a project
Don't know if this is the reason, I check the following website
Choose Your Edition
and it said IntelliJ IDEA Community Edition don't support javascript/Typescript
In IntelliJ, you can list files using the Navigate > File... option (keyboard shortcut Ctrl+Shift+N). Using this feature, if I try to search for Java files ending with IT (which are integration tests), searching for *IT.java will return IterableTransformer.java for example, which is obviously not what I want.
So my question is, I can I do that in IntelliJ?
You can use Find in Path functionality as a workaround: enter an empty search string there, and *IT.java in "file mask" field.
I have a groovy file in my test resources folder (e.g. abc.groovy)
Because I use it like a resource.
Everything works fine except it is red squiggly underlined since IntelliJ thinks it is a code file (actually I use it more like an include file for a scripting engine, which is why I have it in a resources folder)
How can I stop IntelliJ from thinking it is runnable code? I don't want to exclude it from the project completely since it I want it in Version control and available for searching.
It is red underlined because it contains some non-groovy syntax as well (which my program recognizes, but IntelliJ does not)
It will show up in "Problems" sidebar (but not in Problems at the bottom of the IDE, and doesn't prevent code from running)
You can mark that file as plain text (there's an action for that if you right-click on the file in Project View).
I am using a color theme that I am perfectly happy with, but I am dealing with a lot of ".impex" files that are unique to the Hybris platform. The IDE essentially sees them as text files. How can I add syntax coloring to these ".impex" files so the text is not just all one color?
Maybe this plugin can help you.
Syntax highlight for impex files
Besides, you can register a file pattern to a recognised file type: Preferences -> IDE Settings -> File Types.
Is there a way to exclude particular file extension from the results in IntelliJ IDEA's "Find in Path" dialog (invoked by CTRL + SHIFT + F)? I want to exclude all .css files.
In intellij 16 there is a section "File name Filter" to exclude an extension use !*.java. You can give more detailed patterns as well for example I use the pattern below to only return .java files except those with a name starting or ending with test.
Pattern: !*test.java,*.java,!Test*.java
In recent versions of Intellij the GUI has been updated a bit but the same still applies see the "File mask" on the top right hand corner see image below:
In "Find in Path" and "Find in Files" (Ctrl+Shift+F) you can use the "File mask" input.
For example, this would exclude all js, css and twig:
!*.js, !*.css, !*.twig
It's handy cause it also keeps a list of previous inputs, but it gets messy easily when you add a lot of extensions. If it gets too crowded, consider excluding some folders as well (right-click -> "Mark directory as" -> "Excluded")
You can create custom scope there:
In 'Find in Path' dialog you can check radio button 'Custom' and open scopes window.
There you can customize path and search pattern.
Examples of Patterns for Pattern field:
!file:*.css - exclude CSS files
file[MyMod]:src/main/java/com/example/my_package//* - include files from the directory in a project.
src[MyMod]:com.example.my_package..* - recursively include all files in a package.
file:*.js||file:*.coffee - include all JavaScript and CoffeeScript files.
file:*js&&!file:*.min.* - include all JavaScript files except those that were generated through minification, which is indicated by the min extension.
Or check the official documentation.
Good luck!
If you are like me that don't want to use the File Mask option or create a custom scope, etc. but just wanted to be able to add it to project settings one time and be done with it, then here's a solution for you.
I wanted my Find in Path to not search in lock files (auto-generated manifest file by package managers), here's what I had to do for that:
Goto File >> Project Structure (or just press Command+;)
Select Modules under Project Settings
Add a pattern or file names to the Exclude files text-box, in this case: *.lock;package-lock.json and hit Apply, and then ok.
Note The above option is available in IntelliJ 2019 and versions after that, not sure about older versions. For more info, https://www.jetbrains.com/help/phpstorm/excluding-files-from-project.html
WebStorm 2021
CTRL+SHIFT+F and follow the pictures
For 2019.2, the pattern is not set in scope but in the right top windows "File mask" in Find in path dialog. You must tick it.
The syntax I tested are:
exclude files with extension css: !*.css
exclude all under out dir: !out/*
Patterns are separated by comma.
Reference: https://www.jetbrains.com/help/idea/finding-and-replacing-text-in-project.html
For 2021.3.2, just right-click to the folder and Mark Directory as -> Excluded. This will work for logs etc but be careful about source folders.