I'm coming from eclipse and one of my most used feature is to select fiels/folders in the navigator and then execute a search on those (clicking Ctrl+H => only the selected files/folders are searched recursivly).
Pressing Ctrl+Shift+F in IntelliJ only selects the parent folder or the first folder.
How can I search through my selection in IntelliJ?
How to search only through selected files/folders in IntelliJ?
350 views Asked by cobby At
2
There are 2 answers
0
On
Thanks to @Egor Klepikov for the initial answer.
To make the option "Selected files" work, you need to first select the files you wish to search in via the project window (with ctrl+click) as shown below:
Afterwards, open "Find in Files" (shortcut: ctrl+shift+f) and choose "scope" and then in the drop down menu "Selected files" as shown:
Alternative
Another option is to open the files in which you want to search and then select "Open files"



You can switch to the
Scopetab and selectSelected directories/Selected filesfrom the list. E.g.,Here is a related request https://youtrack.jetbrains.com/issue/IDEA-92340 to make this feature work better. Feel free to upvote/comment.