Hi all! We are here again to intorduce you some of our new NetBeans 7.3 features. Today we'll show you some another Twig improvements. So let's start!
First feature is about Code Templates. We added some basic templates to improve your Editor experience. You will be really fast with it!
If someone don't know what Code Templates are, they are piece of code (snippet) which is inserted into editor after typing its abbreviation and pressing
Tab key (or another one which you define in Tools -> Options -> Editor -> Code Templates -> Expand Template on) to epxand it.
All default Twig Code Templates can be found in Tools -> Options -> Editor -> Code Templates -> Twig Markup. You can add your custom templates there as well.
Twig Markup code templates have to be expanded inside Twig delimiters (i.e.
}). If you try to expand them outside of delimiters, it will not work, because then you are in HTML context. If you want to add a template which will contain Twig delimiter too, you have to add it directly into Tools -> Options -> Editor -> Code Templates -> HTML/XHTML. Don't add them into Twig File, it will not work.
The second, minor, feature is, that we know how to colorize Twig Interpolation. It's a small feature, but usefull :-)