A setting or label can appear in several files that need to change together. On a Linux desktop, IntelliJ IDEA can search for that text and replace it across project files in one operation.
Replace in Files can limit the search to a directory and its subdirectories. The results list shows which files contain matches before any edit is made. PyCharm also offers Replace in Files from the Project tool window.
A clean Git working tree lets you see exactly what the replacement changed in tracked files. The diff shows the original and edited text side by side, so you can catch a missing replacement or an unexpected edit before you commit.
Steps to search and replace across a project in JetBrains IDE:
Start in an open, trusted project with Git integration enabled, a clean working tree, an editor tab open, and the Project tool window visible. Keep the Commit tool window closed until the verification steps. This walkthrough covers files that Git already tracks. The pictures use the settings directory in ~/IdeaProjects/newsletter. If IntelliJ IDEA is still analyzing the project, the results are ready to check once the progress indicator clears.
For an unfamiliar project, Preview in Safe Mode on the trust prompt lets you inspect the files before trusting the project. If a new project window opens on the Air panel, opening a project file brings up the editor for step 1.
- Right-click the folder you want to search in the Project tool window.
The example folder contains
email.propertiesandfeed.properties. Theirweeklyvalues should change todaily. Theweeklytext indocs/notes.txtis outside the selected folder. - Choose Replace in Files from the folder's context menu.
The Directory tab opens with the chosen folder filled in. The In Project tab searches across the project.
- Enter the text you want to find in Search once the field is empty or its earlier text is selected.
Typing replaces the selected text. The search text here is
weekly. - Click the Replace field under Search.

- Select the existing text with
Ctrl+Aif Replace shows an earlier value.
- Enter your replacement text in Replace.
The replacement text here is
daily. - Clear File mask if its checkbox is selected.

- Turn off Regex (
.*) if it is on.
- Check that the preview lists every intended match in the selected directory and only those matches.
The example has two matches in two files under
settings. A missing match or a match in the wrong file or on the wrong line is a reason to adjust the search before applying anything. The preview supplies the filenames and lines for the Git comparison. - Press
Alt+Shift+Enterto open the Replace All confirmation.
Confirming the next dialog edits every match in the current results. Cancel leaves the files as they are if the count or either text value is unexpected.
- Click Replace in the confirmation dialog.
If IDE project settings can be added to Git appears, tracking those settings is optional. You can continue with step 12.
- Press
Alt+0to open the Commit tool window.
- Check that the files under Changes match the files in the replacement preview.
A missing or extra file means the result differs from the preview. The example lists exactly
email.propertiesandfeed.properties. - Press
Ctrl+Dto open the diff for the selected changelist.
- Verify that the first file's diff contains every intended replacement from the preview and no other edits.
In
email.properties,channel=weeklychanges tochannel=dailyandformat=plainstays the same. For a single changed file, this completes the check. - Click Compare Next File, the right arrow beside the file count in the diff toolbar, when another file remains.

- Verify that this file's diff contains every intended replacement from the preview and no other edits.
If there are more files, repeat steps 16 and 17 for each remaining file until you have checked the last file's diff. In the example,
feed.propertiesis file 2 of 2 and only the channel value changes. If a diff differs from the preview, the clean baseline gives you a version to restore for that tracked file.