PHP Twig - plugin detail

Twig template language

NetBeans Plugin - PHP Twig
Plugin owner: blogsh
Added: 2011-03-17
License: GPL
Category: Programming Languages
Downloaded: 53,526 times
 4.3, by 14 users

Plugin Log Show log

Versions available

Download plugin   Download size: 0.03 MB   Last Update: 2011-09-19

What's new in this version

Fixed some parsing issues.

Verifications for NetBeans versions

Plugin is not subject to any verification


Syntax highlighting plugin for the Twig template language used by Symfony. INSTALLATION ===================== If you want to install the plugin in a fresh Netbeans installation be sure to install all updates Netbeans is suggesting you. After that you can install the plugin without any errors. I hope to solve this issue soon.

[ You have to be logged in to be able to comment. ]

User Comments


Got it
Posted by ChrisLE on Nov 13, 2016

Source code repo

I would like to have a look into the code. Needed for a new template language. Please give us the link to the repo. Thx.
Posted by ChrisLE on Nov 13, 2016

Selection ability

Is it possible to have "Select Next Element" and "Select Previous Element" enabled in twig editing?

In html when a cursor is inside the content of a tag and I hit a shortcut for "Select Next Element" it selects the whole content of the tag. When I hit it again, it selects it with the tag, and so on.

Thanks for the great plugin.
Posted by sundblum on Nov 21, 2013

indentation problems

this plugin is great but

Labels "block" increases the indented in the code but "endblock" does not this indentation decrease when i chose the "format" option on my netbeans editor.

(sorry for my english i speak spanish)
Posted by montblack on Nov 24, 2011

JS/CSS Twig File Types

I'd also like to see .js.twig and .css.twig support. Great plugin, thanks.
Posted by jingram on Oct 11, 2011

The other extensions

Are you planning to support .css.twig, js.twig, ect.. ?
Posted by Jarzon on Sep 25, 2011

dev binary release

checkout author's website you will notice a dev release on github:

since the version number is not changed. so you have to uninstall the twig plugin first , and add the latest binary release nbtwig_201107221.nbm

which has fixed the freeze
Posted by snakewa on Aug 03, 2011

Latest Git Changes

I saw on your github that you have possibly fixed the freezing issues since this release. Will that be released as a binary in the near future? I'd like to use this plugin but I couldn't before because my whole IDE would lock up when editing twig files.
Posted by mattsnowboard on Jul 29, 2011

Trying to solve that problem...

@ephraim_sc31: Which version of Netbeans and which OS do you use? Maybe you have some old files that don't get overridden by the new installations?
However I tried to install the plugin on a fresh install of Netbeans 7.0 on Ubuntu and Windows and everything is working as expected. I installed Netbeans, started it, waited for the update message to appear in the bottom right corner, let Netbeans update all native plugins and then restarted the program. After that I installed the Twig plugin. After following these steps the plugin should work.
What I can image is that your plugin repository isn't the official one? This can be the case if you have Debian and are using the current APT version or something like this. These versions have custom entries in Plugins -> Settings and they have no access to the latest official plugin versions. However, this shouldn't be the case for Windows or Ubuntu.
Posted by blogsh on Jul 22, 2011

it did not work

@blogsh I updated two days ago Netbeans, I try to re-downoad and re-update after the first uninstall... but it did not work
Posted by ephraim_sc31 on Jul 22, 2011

Installation instructions

@ephraim_sc31: I added installation instructions to the description of the plugin. You first have to install all updates for Netbeans and then install the plugin. Then everything will work well.
Posted by blogsh on Jul 22, 2011

I lost one day for reinstall all NetBeans!

Do not install this plugin with last version!!!
At Netbeans Restart the PHP plugin has corrupted.
Posted by ephraim_sc31 on Jul 22, 2011

{%% - bug

I used to type first "{%%}" and then enter something inside the brackets.
But when I type "{%%" , that causes Netbeans 7 to freeze.
Fix for this will be really appreciated.
Posted by websirnik on Jul 21, 2011


No problem. When you install the plugin, he loads the required libraries to it. php module does not update. So the cure problems in the update.

Anywhere great job. Thanks!
Posted by ustim on Jul 07, 2011


I think you did not update Netbeans before installing the plugin. Please try to install Netbeans and then install the updates Netbeans is suggesting you. After that there should be no problems when you want to install the Twig plugin.
This is a known issue and I'll try to solve it soon.
Posted by blogsh on Jul 07, 2011

crash IDE

In my case, this plugin broke twice Netbeans (just installed).
I've used it before. And I think it very useful.
Posted by ustim on Jul 07, 2011


I'll try it in ZF context - but very nice approach!
Posted by gabelde on Jun 14, 2011

Nice indeed

Thank you for this plugin, works like a charm and is a real benefit.
Posted by riker09 on May 13, 2011

Great job!

Very nice, thanks!
Posted by umpirsky on Apr 15, 2011

Great Plugin

This is great! Nice work
Posted by kingpin393 on Mar 19, 2011