IntelliJ IDEA global search

2019-01-23 22:10发布

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.

5条回答
Summer. ? 凉城
2楼-- · 2019-01-23 22:41

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.

查看更多
可以哭但决不认输i
3楼-- · 2019-01-23 22:53

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

查看更多
Animai°情兽
4楼-- · 2019-01-23 23:03

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.

查看更多
Deceive 欺骗
5楼-- · 2019-01-23 23:05

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.

查看更多
放荡不羁爱自由
6楼-- · 2019-01-23 23:08

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.

查看更多
登录 后发表回答