In IntelliJ IDEA, is there an option to find and replace a symbol for whole project with on time operation?
Asked
Active
Viewed 8.1k times
95
isherwood
- 52,576
- 15
- 105
- 143
Supun Wijerathne
- 10,994
- 9
- 49
- 82
-
1https://www.jetbrains.com/help/idea/2016.1/finding-and-replacing-text-in-project.html – Madhawa Priyashantha Jul 13 '16 at 04:40
-
IntelliJ IDEA has extensive support for refactoring, see https://www.jetbrains.com/help/idea/2016.1/refactoring-source-code.html What exactly do you want to do? – Wim Deblauwe Jul 13 '16 at 07:02
-
Check this video https://www.youtube.com/watch?v=PREdDtOoh1Q – Shreyos Adikari Mar 18 '20 at 03:08
3 Answers
140
EDIT:
Here is the Visual representation for better understanding.
Replacing a piece of text in all the files within the specified path do one of the following:
- On the main menu, choose Edit | Find | Replace in Path
- Press Ctrl + Shift + R
You can try Ctrl + Shift + F.
And if you are using Eclipse keymap for IntelliJ then you can use Ctrl + H.
Shreyos Adikari
- 12,089
- 19
- 71
- 81
-
3
-
9**Ctrl+Shift+R** is the answer. Then you click *Replace* in the *Replace in Path* dialog box. But here's the bizarre thing: nothing gets replaced! The dialog box closes and a window opens at the bottom part of the screen showing occurrences. Then you need to click the *Replace All* button in that window. Then a new dialog box pops up where you need to click the *Replace* button yet again. **Inefficient UI, poor Ux**. – Paulo Merson Jan 31 '19 at 13:07
-
1
-
1
5
Windows/Linux Shortcut
CTRLSHIFTR
MacOS Shortcut
⇧⌘R
Common Shortcut
Press SHIFT twice and type Replace in Path
You get an option to apply file mask, scope, etc.
Saikat
- 11,375
- 15
- 92
- 108
1
For me, worked:
Ctrl + H - To replace all occurrences in a specific file
Ctrl + Shift + H - To replace all occurrences in all files
But I remember I have configured my key map in VSCode style. Also, I am working on Ubuntu 20.04.2 LTS, but it looks unrelated.
Hosana Gomes
- 327
- 4
- 6