Suppose I have this code:
var x = 2;
var y = x;
Then I realize that I actually wanted this:
var y = someMethod(x);
To accomplish this, first I need to position the cursor to the left of "x", then type "someMethod(", then move my cursor to the right, and then add the final ")".
What I'd love is to have a way to, say, highlight "x", and have it automatically get inserted as a parameter to whatever I start typing.
Is there something for this in IntelliJ?
Try using Statement Completion:
x
Ctrl + Shift + Enter