When working on a project, sometimes global search and replacement will be performed in the entire project or in a specified folder, which is a very convenient feature. How to use it is as follows:
1. Global search
1. Use the shortcut keys Ctrl+Shift+F to open the search window, or click Edit>Find>Find in path to open the search window, as shown in the figure below:
2. The search interface is as follows, mainly divided into three parts: upper, middle and lower. The upper part is mainly search conditions (the content, scope, method, etc. to be searched). The middle part is a list of files containing the search content. Click on a single file to preview the file content in the following part.
3. The search scope includes the entire project In project, module module, specified directory directory, specified scope scope.
4. By checking the condition check box at the top, you can realize regular search, specify file suffix, etc.
2. Global replacement
Global replacement is similar to global search, except that there are more replacement operations.
1. Open the window through the shortcut key Ctrl+Shift+R, or open the window by clicking Edit>Find>Replace in path. There are more input boxes to fill in the replacement content than the search window, as shown in the figure below:
2. Click Replace in Find Window in the lower right corner to start the replacement operation. If there are many files to replace, you will prompt confirmation boxes such as whether to continue and which files to replace, and select as needed.
Summarize
The above is the diagram of the IntelliJ IDEA global content search and replacement tutorial introduced to you by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to Wulin.com website!