I have an expression in java:
str.trim()
and I would like to "transform" it to:
myFunction(str.trim())
The only things I would like physically do are:
- Select the initial expression
- Press the magic key
- just write "myFunction" (I would not type the parenthesis, or move the caret at all, and ideally I would get a suggestion upon ctrl+space for myFunction).
Is it possible? (live templates did not help)
EDIT: This question was marked as a duplicate of Custom surround template which is not the case, since the specific question describes how to create a live template for a a specific surround, eg console.log($SELECTION$). My question is more generic, as I do not want to define a live template for each and every case, but something the will work anywhere, anytime, within of course the editing context.