1

I tend to search project files in Android Studio with CMD+SHIFT+O shortcut because it gives all project related files instead of Double Shift searching through all existing files in the SDK (as far as I know).

However, I haven't found a way to filter out ViewBinding files that ButterKnife creates. The thing is, ViewBinding files always appear on top of the file I am looking for. enter image description here

Is there a way to exclude them from cmd+shift+o search result?

amira
  • 416
  • 1
  • 7
  • 24

1 Answers1

0

You can add a scope to filter searches like this. Open Find path Create your custom scope Type this snippet to Pattern to avoid generatedJava appears from find path

!file:*intermediates*/&&!file:*generated*/&&!lib:*..*

I think it should be work, coz it works for me... enter image description here

Nanda Z
  • 1,604
  • 4
  • 15
  • 37
  • I tried your method, but still those files show up. I want to filter our those files when I do "Enter File Name" search (shortcut **cmd+shift+o**). – amira Jan 07 '19 at 07:14
  • make sure when in find path mode, you immediately switch to the scope tab and have chosen the name of the scope that was created earlier – Nanda Z Jan 07 '19 at 07:18
  • Oh, it looks like you are looking for files via Ctrl + N (in Windows), everything I do is the same as Ctrl + Shift + F, for searching. Too bad to my knowledge that can only be done with Ctrl + Shift + F or Command + Shift + O on Mac – Nanda Z Jan 07 '19 at 07:34
  • you mean that filtering can only be done to ctrl+shift+f? wheeee.... but thanks though :) – amira Jan 07 '19 at 07:50
  • ya, because the search file (Ctrl+N) I did still shows the file generated Java, but the result is very little so it doesn't matter. – Nanda Z Jan 07 '19 at 07:55