5

I am having trouble figuring out how to highlight my html syntax in NetBeans IDE 7.1.1 when I open file having twig extension.

I tried to install the php symfony framework plugin for NetBeans but nothing changed.

j0k
  • 22,600
  • 28
  • 79
  • 90
underscore666
  • 1,719
  • 4
  • 24
  • 37

3 Answers3

3

You do not need to install any plugin.

You need just to add a new file extension twig in

NetBeans → Miscellaneous → Options → Files

And then you need to associate the twig extension to HTML.

The result will be the following:

Coloured code screenshot

Community
  • 1
  • 1
antonjs
  • 14,060
  • 14
  • 65
  • 91
  • Hmmm. Have you actually tried this? Twig is not html and I rather doubt that you will get useful twig oriented high lighting from a html processor. – Cerad Apr 25 '12 at 00:58
  • Yes, I tried. so you can see the HTML part with the right color. Just the twig part will be in black. You can see the result on the pic I attached. – antonjs Apr 25 '12 at 08:29
  • still better than nowt – Tebe Jan 24 '16 at 09:17
1

Closest thing you can do is adding twig extension in Tools->Options->Miscellaneous->Files tab and set MIME as TPL (text/x-tpl). By doing this editor will not show html errors.

Mun Mun Das
  • 14,992
  • 2
  • 44
  • 43
1

There is this Plugin for NetBeans 7.0 (and above) which I just found, installed and it is working fine in my NetBeans 7.2.1.

PHP Twig Plugin: http://plugins.netbeans.org/plugin/37069/php-twig

Install: 0. Download the Plugin. 1. Menu > Tools > Plugins > Downloaded [find it and install it] 2. Activate it. Menu > Tools > Plugins > Installed [check and click Activate] 3. Restart NetBeans. (Close and Open again) 4. Enjoy it ;)

7cannons
  • 11
  • 3