How to search for text in entire IntelliJ project? - intellij-idea

I'm looking to replace every instance of a variable in my IntelliJ project. I know that it is present in quite a few files within the project, but I can't find a way to find them all. Is the some way to search for a variable in all of the files I have at once? I am on Windows.

ctrl+shift+f to open a modal to search all file contents. Then press ctrl+shift+R to open up the replace dialog.

Call Refactor | Rename action while the cursor is on the variable.
IntelliJ IDEA will do the rest.

Related

Intellij any way to turn off overwrite confirmation?

Given the power of intellij, one would think disabling the overwrite file confirmation popup is possible. It appears after right-clicking a file in the Project Tool window, clicking copy, and clicking paste anywhere a file with the exact same name exists:
I could find no specific setting to do it. Ideas? (pun intended)
Since it's a potentially dangerous operation, IntelliJ IDEA doesn't provide an option to skip this dialog. When overwriting multiple files, there will be an option to do it for all files at once.

How to show class file in explorer in idea

How to show class file (not java file) in explorer in IDEA?
When I select a java file, I want to position it in the explorer, I know in Eclipse it is easy, but what I should do in IDEA?
You can do it with the External Tool like this:
This answer describes what parameters to use for the explorer.exe to select the file.
Using IntelliJ IDEA macros the Arguments field will look like this:
/select,"$OutputPath$\$FileDirRelativeToSourcepath$\$FileNameWithoutExtension$.class"
It will open Explorer with the output file selected:
For the source file located in C:\work\attaches\hotswap-bug\src\foo\bazz\Another.java the tool will select C:\work\attaches\hotswap-bug\out\production\hotswap-bug\foo\bazz\Another.class file.
This tool can be invoked from the editor right click menu while inside the source .java file:
You can also assign a keyboard shortcut to this tool or make an action in the toolbar for easier access.
Final result:
Just curious, what's the real world use case for this?

How do you configure IntelliJ IDEA to place the cursor in the editor window after hitting enter on a file in the project window?

I'm big on not using the mouse, especially while writing code. I've noticed in IntelliJ IDEA 2016.1 that when I'm navigating in the project window, hitting Enter while a particular file is selected opens the file in an editor, but it doesn't place the cursor in the editor. Interestingly, if I double-click on the file in the project window, the cursor is placed in the editor.
How do I configure IntelliJ to place the cursor in the editor after opening the file via Enter from the project window?
To the best of my knowledge, I do not believe there is a way to configure what you are looking for. A search for focus in the settings didn't turn up anything.
That said, hitting Esc when in the project view will return you to the editor. So you would need to do Enter, Esc. If having to type two keys in a row bothers you, you could always record a macro (Edit > Macros) to do that key sequence and map it to a shortcut.

Is there a way to search only in files that have been changed in IntelliJ IDEA?

Is there a way to search for a string in files that have changed? I want to search for the comments I've added before I commit them, but I only know how to search for comments in every file of my project.
Current accepted answer is outdated, this is how you currently search only in your changed files: (don't miss that you should scroll down, the scrollbar is hidden when it's still)
Searching changed files is an option in the "Find in Path" function.
In the scope of your find, select Custom, then use the dropdown to select Changed Files.
As of Intellij 2022.2.4 the option is located in the "Find in Files dialog" (at least on MacOS).

In Intellij IDEA, is there a way to copy the path of the current editor tab to the clipboard?

I'm doing some writing and would like to copy the path of the current editor tab (as shown in the tooltip here) to the clipboard:
Anyone happen to know a shortcut for this?
Ctrl+Shift+C works on Windows, even if your focus is on the editor.
I assume Cmd+Shift+C will also work on a Mac.
Press Alt+Home to select current file on Navigation Bar:
Then Shift+Command+C to copy path to a file and Esc come back to editor.
I found Ctl+Shift+Alt+C can copy path with UNIX slash, not backslash.