Adobe Dreamweaver CS6 (and CC) doesn't do code-hightlight for *.TWIG files / Notepad++ Auto-Twig highlight

4.1k Views Asked by At

I have issues with my Adobe Dreamweaver CS6 (and CC) to support TWIG files. I tried some of the tutorials found on Google saying I need that extension in settings and also edit one of dreamweaver configuration files. But It didn't worked. The only thing I did, is that Dreamweaver is able to open *.twig files, but it is opening them as a plain text, when it should do HTML5 markup highlighting. Maybe someone knows the tutorial/required actions to make it work?

As an addition question I will ask how to make in Notepad++ to understand *.twig file type on the first open, so I don't need to choose 'programing language' from Menu each time I open *.twig file.

To be more clear. I followed instructions from: http://helpx.adobe.com/dreamweaver/kb/change-add-recognized-file-extensions.html

I edited both files (one in Program Files, and the second in Users folder), and it still not highlights the "abc.html.twig" file. Displays as plain.

1

There are 1 best solutions below

0
On

I was just having this issue, with CS6 (following Adobe's site). Make sure to have Dreamweaver turned off.

Edit:

C:\Users\\[username]\AppData\Roaming\Adobe\Dreamweaver CS6\en_US\Configuration\Extensions.txt

Find:

HTM,HTML,...,SVG:All Documents
HTM,HTML,HTA,HTC,XHTML:HTML Documents

Change to:

HTM,HTML,...,SVG,TWIG:All Documents
HTM,HTML,HTA,HTC,XHTML,TWIG:HTML Documents

Turns out that there is a second MMDocumentTypes.xml in:

C:\Users\\[username]\AppData\Roaming\Adobe\Dreamweaver CS6\en_US\Configuration\DocumentTypes\MMDocumentTypes.xml

and

C:\Program Files\Adobe\Adobe Dreamweaver CS6\configuration\DocumentTypes\MMDocumentTypes.xml

Edit both these files and change this line in both:

<documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml" macfileextension="html,htm,shtml,shtm,tpl,lasso,xhtml,ssi" file="Default.html" writebyteordermark="false" mimetype="text/html">

to

<documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml,twig" macfileextension="html,htm,shtml,shtm,tpl,lasso,xhtml,ssi,twig" file="Default.html" writebyteordermark="false" mimetype="text/html">

Open up a twig file with Dreamweaver and it should now show HTML highlighting within your twig files!

Hope this helps!