Live Template - Pass a variable to another's default value




I'd like to know if there is a way to pass the $PanelName$ value as a default value to LabelName.


Thank you.

1 comment

Yes, sure it's possible - just enter variable name (PanelName, no quotes!) as default value.

But note that default value of variable is only used when variable expression is empty. You have specified expression for your $LabelName$ variable, so default value will never be used. You can use either of them, but not both at the same time - as they both are used for same purpose (specifying default value).

For example, 'spaceSeparated(PanelName)' set as expression for $LabelName$ will result in $PanelName$ value, with camel case changed to space separated format (PanelName => Panel Name). PanelName used as expression is the same as PanelName set as default value - value of $PanelName$ variable will be used as default...

Hope it makes things clear



Please sign in to leave a comment.