Twig Syntax Highlighting with TextMate | Chris Page

Twig Syntax Highlighting with TextMate

Feb 18

What is Twig?

Twig – The flexible, fast, and secure template language for PHP. Brought to you by Fabien Potencier, creator of the Symfony Framework.

What is TextMate?

TextMate is a general-purpose GUI text editor for Mac OS X created by Allan Odgaard. Notable features include declarative customizations, tabs for open documents, recordable macros, folding sections and snippets, shell integration, and an extensible bundle system.” — Wikipedia

What is cool that I’m sharing with you today?

A nice little Twig syntax highlighting bundle for TextMate, made by Andrew Fricke. You can checkout the code from Andrew’s Github Repo:

Steps to install the bundle on Mac OSX:

mkdir -p ~/Library/Application Support/TextMate/Bundles
cd ~/Library/Application Support/TextMate/Bundles
git clone
osascript -e 'tell app "TextMate" to reload bundles'

Restart TextMate, and enjoy syntax highlighting of your .twig files!

Leave a Reply