13

Follows this page https://www.jetbrains.com/help/pycharm/2016.1/find-and-replace-in-path.html?origin=old_help#mask , it should be able to exclude many files using "!" symbol in front of the regular pattern like: *.java, when doing text search inside IntelliJ projects.

On my project, when I fired Ctrl + Shift + F to do text search for string xyz. There's over 100+ results return in both *.ftl and *.java files. I tried to reduce the results on only ftl files by changing the "File mask(s)"-Option to "!*.java" . But it did not work! The result list is empty!

Googling on the excluding file pattern results in creating custom file filters for each particular search, which I don't want to maintain!

Do I miss something here or IntelliJ is just bad on this function (I'm using IntelliJ 15)? With Eclipse, the "File mask" was amazing!

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Tim Long
  • 2,039
  • 1
  • 22
  • 25

4 Answers4

14

You have to use !*.java instead of !.java

Piotr Korlaga
  • 3,338
  • 2
  • 19
  • 28
4

As for IDEA 2019.1 Ultimate, it works for me(exclude with !*.yml or anything else).

If it does not in yours, as you only as .ftl file to exclude, why not add mask as *.java?

PS: what does not work is exclude some path, like "all files under out/ folder". With !out/* or anything ales it does not work.

WesternGun
  • 11,303
  • 6
  • 88
  • 157
1

Forget about File Mask and use Scope:

scope image

In Scope the options are unlimited where you can select folder include/exclude files or folders.

jtate
  • 2,612
  • 7
  • 25
  • 35
Digital Alpha
  • 226
  • 1
  • 12
0

Excluding file paths in the Find in Path dialogue was not added until IntelliJ 2016.1 per this IntelliJ forum response.

Kevin
  • 1,195
  • 12
  • 14