IntelliJ IDEA global search

SearchFull Text-SearchIntellij Idea

Search Problem Overview


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.

Search Solutions


Solution 1 - Search

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

Solution 2 - Search

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.

Solution 3 - Search

Use grep.

In the terminal, go to the root directory of your project, and type grep -r my_string_here ..

You can add color to your search with --color (just add alias grep='grep --color' to your .bash_profile, and add -i` to make your search case-insensitive.

Solution 4 - Search

In the IntelliJ now it is very easy to find the anything through just two clicks and search on the bar.

Double click on shift and enter the keyword in the search bar.
I'm using ubuntu which I found the shortcut.

Solution 5 - Search

My workplace eventually set up Atlassian Fisheye which allows us to search for code or specific files across all of our projects, and it's working well.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJon OnstottView Question on Stackoverflow
Solution 1 - SearchRachelView Answer on Stackoverflow
Solution 2 - SearchArtemGrView Answer on Stackoverflow
Solution 3 - SearchRose PerroneView Answer on Stackoverflow
Solution 4 - SearchJitendraView Answer on Stackoverflow
Solution 5 - SearchJon OnstottView Answer on Stackoverflow