How do I get/create variables in a new Live Template?
I'm still on version 7 and I'm new and comming from an Eclipse background.
I've searched the help and didn't find the answer to this. Also Googled.
So if you create a new Live Template, I notice that the Edit Variables button is disabled and that if you use something like $USER$ it doesn't color-ize.
Does anybody have a clue on how to use variables in Live Templates? Do I need a plugin or something? I just can't believe that IntelliJ doesn't have this when Eclipse does.
Jim C.
请先登录再写评论。
> I just can't believe that IntelliJ doesn't have this when Eclipse does.
This is a functionality I use all the time and I have a lot of custom live templates working properly.
Typing $WHATEVER$, should recognize it as a variable and allow you to edit click on "Edit variables". Note that you should have dolar signs before AND after the variable name.
This is core functionality, so no plugin is needed.
And it has always worked correctly for me.
Download the latest 8.x release and if that works and 7.x doesn't, report a bug: http://www.jetbrains.net/jira/browse/IDEA
Aha! I was using some bad syntax that I saw elsewhere. ${STUFF}$. Drop the {} and it works!
Glad to hear you got it wokring. For your reference, here are some help pages that might be helpful as you work with live templates: