Documentation
Syntax highlighting and auto-completion for Twig in Sublime Text 2
is possible with : PHP-Twig.tmbundle
- TWIG Doc “IDEs Integration” : http://twig.sensiolabs.org/doc/templates.html#ides-integration
- Bundle’s Github : https://github.com/Anomareh/PHP-Twig.tmbundle
- Bundle’s Documentation : https://sublime.wbond.net/packages/PHP-Twig
Download
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
Installation
To install this bundle in Sublime Text, a few extra steps are required.
- Open Sublime Text and in the Preferences menu click Browse Packages.
- In the directory that was just opened, create a new directory
PHP-Twig/. - Copy the content of this repo into the directory you just created.
- Move the contents of the
PHP-Twig/Syntaxes/directory toPHP-Twig/ - Restart Sublime Text.
Apply
To apply syntax highlighting on your Twig HTML files :
- Open a
.html.twigfile - Go to View menu → Syntax → Open all with current extension as → HTML (Twig)
That’s it. It should work by now.
Screenshot
