Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA global search

I would like to search across projects for variable usages, or at least for strings. I've got IndexYourFiles which works well for text searches, but I have to re-index every now and then and would like an integrated solution.

Is there any way that I can search across projects in IntelliJ IDEA? So far I have only been able to search within the currently-open project. I'm guessing IntelliJ can't do this natively; are there any plug-ins out there to support this?

Thanks.

like image 270
Jon Onstott Avatar asked Feb 08 '11 19:02

Jon Onstott


People also ask

How do I globally search in IntelliJ?

Search everywhereFrom the main menu, select Navigate | Search Everywhere or press Shift twice to open the search window. By default, IntelliJ IDEA displays the list of recent files.

How do I search for packages in IntelliJ?

Press Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment | Package Search.

How do I change global settings in IntelliJ?

To configure project settings, select IntelliJ IDEA | Preferences on macOS or File | Settings on Windows and Linux from the main menu. Alternatively, you can press Ctrl+Alt+S to show the IDE settings. icon. Other settings are global and apply to all existing projects.

Why search is not working in IntelliJ?

As lena said, the following should fix it for you: Click File -> Invalidate Caches / Restart.. Click the button "Invalidate and Restart" After restart, try run the search again.


2 Answers

IntelliJ is project based so you can only search within the open project using Ctrl + Shift + F(Windows) or Cmd + Shift + F(Mac).

When I need to search across a set of projects I use Agent Ransack

like image 170
Rachel Avatar answered Sep 24 '22 17:09

Rachel


IntelliJ 13 (at least) has "Edit/Find/Find in Path...".
It has the Scope option which can be set to a directory, so if all projects are in the same directory (e.g. IdeaProjects) then it will search all projects.

like image 39
ArtemGr Avatar answered Sep 24 '22 17:09

ArtemGr