Live Template Variables
I know this same question has been asked before in other JetBrains forums, but not here as far as I can tell ;-)
Are there any magic variables available to us in the live templates other than $SELECTION$?
I had hoped a magic $CLASS$ and $METHOD$ would give me the class and method I'm in, but no such luck. For me, those would be enormously helpful, as would a way to grab all of the variables being passed to the method, something like $ARGS$
For anyone who's interested, the live template I'm putting together simply calls super. I imagine this will be included in the default set before all is said and done, but until then...
super($CLASS$, self).$METHOD$($ARGS$)
Please sign in to leave a comment.
Hello Joe,
Live templates don't have any magical variables - instead, they have non-magical
functions which are handily listed in a combobox (press "Edit Variables",
select the "Expression" column). Right now there aren't any Python specific
functions, but there will be some in future EAP builds. YouTrack issues for
the things you'd like to see are welcome.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Leave it to you guys to go and exceed my expectations ;-)
I'll hop onto YouTrack soon to make a couple of requests.
Thanks for your help.