I know by clicking on variable name Intellij highlights references to that local variable inside a method.
On so many occasions I want to find(Ctrl+F) a string(other than variable name) i.e think of
- string inside log stmt
- substring of variable name
- substring of other method name -calls from inside the method you are in
I would like to limit the scope of this search/find inside the method I am working in.
However, Intellij takes me to another method(matching the search string) inside the same class and I loose the location of the method I was working on. I have to do Back(Ctrl+Alt+Left) to back to the method I was in. Doing this 100's of times a day is rather unproductive and I loose focus.
Is there a way/intellij action to limit the scope of your search/find to the method you are in instead of the whole class.
It is impossible.
But you can click "All" button:
then expand your method in "Find:" tab in bottom left corner(by default).