Is there any way to surround selection with an arbitrary method call?
Ex: let say, you have return dx;
and you want to quickly transform it into return Math.abs(dx);
I'm aware of templates but then you have to hard code your surrounding(Math.abs
in this case) and I'm looking for a generic solution, not bounded to any predefined method.
UPD 22.01.2019:
As @de-li pointed out, the .arg
postfix template is added. At the moment confirmed for Java. Feel free to vote for the Kotlin support: https://youtrack.jetbrains.com/issue/KT-29398
UPD:
.arg
template is available for Kotlin since 1.3.40-dev-568