I want to know how can I have highlighting syntax for TWIG in Sublime Text.
Actually when I open a TWIG file all fonctions and conditions are similar (white on black) :
You can also install PHP-Twig.tmbundle through Sublime Text's Package Control.
With Package Control installed:
It will install the same version of @antoine-subit's answer, and will automatically use the correct syntax for any Twig file you open
Syntax highlighting and auto-completion for Twig in Sublime Text 2
is possible with : PHP-Twig.tmbundle
You can clone the project with :
git clone https://github.com/Anomareh/PHP-Twig.tmbundle.git
Or download it directly from the Github (last master version) :
https://github.com/Anomareh/PHP-Twig.tmbundle/archive/master.zip
To install this bundle in Sublime Text, a few extra steps are required.
PHP-Twig/
.PHP-Twig/Syntaxes/
directory to PHP-Twig/
To apply syntax highlighting on your Twig HTML files :
.html.twig
fileThat’s it. It should work by now.
Happy Coding!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With