问题
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!
回答1:
You have to use
!*.java
instead of !.java
回答2:
Excluding file paths in the Find in Path dialogue was not added until IntelliJ 2016.1 per this IntelliJ forum response.
回答3:
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.
来源:https://stackoverflow.com/questions/36262526/intellij-file-mask-not-working-on-simple-excluding-file-pattern-why