I am trying to create my own live template which uses the current line that my cursor is on, but I cannot find the variable for it.
To explain what I mean, IntelliJ has a built-in .sout template which SOUTs the current statement.
I am trying to find a way to add my own .[extention] that wraps the current code on that line, into a different statement.
So something like this:
Any ideas on how to get that done properly?
CodePudding user response:
You need to create postfix completion. Rather than Live template, postfix completion surrounds an expression you’ve just typed. See https://www.jetbrains.com/help/idea/settings-postfix-completion.html