An easier way to search for text in OPEN files

Hello everyone. Thanks to IntelliJ Support for their help with this, which I'm passing on in case others find it useful. I often want to search for a string in all Open files, and was finding it tedious to first open the Find in Files dialog, then select the Scope tab, then select Open Files as the scope. To make this more efficient, I recorded the following steps as a macro:

  1. Find in Files (Ctrl+Shift+F in my key mappings)
  2. Alt+P to select the Project scope (just so the Scope tab won't be selected)
  3. Alt+S to select the Scopes tab
  4. Type "open"

I then assigned the macro to a keystroke, so now I have my one-key "Find in Open Files". It works best if you first select your search text in the editor.

Step 2 is necessary in case your previous search was also "Find in Open Files". I found that it would replace my actual search term with the word "open" - step 2 prevents that, so you get the search term that was selected in the editor.




Please sign in to leave a comment.