Another Twig Improvements

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!

Code Templates

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 Code Templates

Note:
Twig Markup code templates have to be expanded inside Twig delimiters (i.e. { and }). 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.

Interpolation Coloring

The second, minor, feature is, that we know how to colorize Twig Interpolation. It's a small feature, but usefull :-)

Interpolation Coloring

And that's all for today and as usual, please test it and if you find something strange, don't hesitate to file a new issue (product php, component Twig). Thanks a lot!

Comments:

Will the Twig/HTML indentation problem be fixed for Netbeans 7.3? https://github.com/blogsh/Twig-netbeans/issues/22

Posted by guest on November 30, 2012 at 01:37 AM CET #

Probably not. Sorry. It's not so simple as it looks like.

Posted by Ondrej Brejla on December 03, 2012 at 09:19 AM CET #

I miss the quick action of comment / uncomment to twig

Posted by guest on June 12, 2013 at 02:20 PM CEST #

It has been implemented a bit later - https://blogs.oracle.com/netbeansphp/entry/toggling_comments

Posted by Ondrej Brejla on June 12, 2013 at 02:22 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today